Skip to content

Commit

Permalink
Fix small typo in 2024-04-13-deprecate_async_track_state_change blog …
Browse files Browse the repository at this point in the history
…post (#2516)
  • Loading branch information
AdarWa authored Dec 27, 2024
1 parent 80935d4 commit c6104ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blog/2024-04-13-deprecate_async_track_state_change.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Example with `async_track_state_change`:

```python
from homeassistant.core import State, callback
from homeassistant.helper.event import async_track_state_change
from homeassistant.helpers.event import async_track_state_change

@callback
def _async_on_change(entity_id: str, old_state: State | None, new_state: State | None) -> None:
Expand All @@ -26,7 +26,7 @@ Example replacement with `async_track_state_change_event`:

```python
from homeassistant.core import Event, EventStateChangedData, callback
from homeassistant.helper.event import async_track_state_change_event
from homeassistant.helpers.event import async_track_state_change_event

@callback
def _async_on_change(event: Event[EventStateChangedData]) -> None:
Expand All @@ -37,4 +37,4 @@ def _async_on_change(event: Event[EventStateChangedData]) -> None:

unsub = async_track_state_change_event(hass, "sensor.one", _async_on_change)
unsub()
```
```

0 comments on commit c6104ec

Please sign in to comment.