Remove useless _update function in ESPHome (#107927)

This function is never overwritten so we can remove it
This commit is contained in:
J. Nick Koston 2024-01-13 08:39:27 -10:00 committed by GitHub
parent 6cbf1da76a
commit 1cf96a6558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,13 +301,11 @@ class EsphomeAssistEntity(Entity):
connections={(dr.CONNECTION_NETWORK_MAC, device_info.mac_address)}
)
@callback
def _update(self) -> None:
self.async_write_ha_state()
async def async_added_to_hass(self) -> None:
"""Register update callback."""
await super().async_added_to_hass()
self.async_on_remove(
self._entry_data.async_subscribe_assist_pipeline_update(self._update)
self._entry_data.async_subscribe_assist_pipeline_update(
self.async_write_ha_state
)
)