Fix Shelly event handling (#67000)
This commit is contained in:
parent
d45921622a
commit
ba2bc975f4
1 changed files with 11 additions and 13 deletions
|
@ -681,19 +681,17 @@ class RpcDeviceWrapper(update_coordinator.DataUpdateCoordinator):
|
||||||
ENTRY_RELOAD_COOLDOWN,
|
ENTRY_RELOAD_COOLDOWN,
|
||||||
)
|
)
|
||||||
self.hass.async_create_task(self._debounced_reload.async_call())
|
self.hass.async_create_task(self._debounced_reload.async_call())
|
||||||
elif event_type not in RPC_INPUTS_EVENTS_TYPES:
|
elif event_type in RPC_INPUTS_EVENTS_TYPES:
|
||||||
continue
|
self.hass.bus.async_fire(
|
||||||
|
EVENT_SHELLY_CLICK,
|
||||||
self.hass.bus.async_fire(
|
{
|
||||||
EVENT_SHELLY_CLICK,
|
ATTR_DEVICE_ID: self.device_id,
|
||||||
{
|
ATTR_DEVICE: self.device.hostname,
|
||||||
ATTR_DEVICE_ID: self.device_id,
|
ATTR_CHANNEL: event["id"] + 1,
|
||||||
ATTR_DEVICE: self.device.hostname,
|
ATTR_CLICK_TYPE: event["event"],
|
||||||
ATTR_CHANNEL: event["id"] + 1,
|
ATTR_GENERATION: 2,
|
||||||
ATTR_CLICK_TYPE: event["event"],
|
},
|
||||||
ATTR_GENERATION: 2,
|
)
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
async def _async_update_data(self) -> None:
|
async def _async_update_data(self) -> None:
|
||||||
"""Fetch data."""
|
"""Fetch data."""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue