Skip to content

Commit

Permalink
Update common.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dimonb authored Nov 13, 2024
1 parent e28184a commit be7198b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/localtuya/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
dispatcher_send,
)
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.restore_state import RestoreEntity
Expand Down Expand Up @@ -348,13 +348,13 @@ def status_updated(self, status):

def _dispatch_status(self):
signal = f"localtuya_{self._dev_config_entry[CONF_DEVICE_ID]}"
async_dispatcher_send(self._hass, signal, self._status)
dispatcher_send(self._hass, signal, self._status)

@callback
def disconnected(self):
"""Device disconnected."""
signal = f"localtuya_{self._dev_config_entry[CONF_DEVICE_ID]}"
async_dispatcher_send(self._hass, signal, None)
dispatcher_send(self._hass, signal, None)
if self._unsub_interval is not None:
self._unsub_interval()
self._unsub_interval = None
Expand Down Expand Up @@ -422,7 +422,7 @@ def _update_handler(status):
)

signal = f"localtuya_entity_{self._dev_config_entry[CONF_DEVICE_ID]}"
async_dispatcher_send(self.hass, signal, self.entity_id)
dispatcher_send(self.hass, signal, self.entity_id)

@property
def extra_state_attributes(self):
Expand Down

0 comments on commit be7198b

Please sign in to comment.