Skip to content

Commit 06480bf

Browse files
janiversenfrenck
authored andcommitted
Fix enable/disable entity in modbus (home-assistant#151626)
1 parent 625f586 commit 06480bf

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

homeassistant/components/modbus/entity.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
CONF_VIRTUAL_COUNT,
6363
CONF_WRITE_TYPE,
6464
CONF_ZERO_SUPPRESS,
65-
SIGNAL_START_ENTITY,
6665
SIGNAL_STOP_ENTITY,
6766
DataType,
6867
)
@@ -143,7 +142,6 @@ def async_disable(self) -> None:
143142
self._cancel_call()
144143
self._cancel_call = None
145144
self._attr_available = False
146-
self.async_write_ha_state()
147145

148146
async def async_await_connection(self, _now: Any) -> None:
149147
"""Wait for first connect."""
@@ -162,11 +160,6 @@ async def async_base_added_to_hass(self) -> None:
162160
self.async_on_remove(
163161
async_dispatcher_connect(self.hass, SIGNAL_STOP_ENTITY, self.async_disable)
164162
)
165-
self.async_on_remove(
166-
async_dispatcher_connect(
167-
self.hass, SIGNAL_START_ENTITY, self.async_local_update
168-
)
169-
)
170163

171164

172165
class BaseStructPlatform(BasePlatform, RestoreEntity):

0 commit comments

Comments
 (0)