mirror of
https://github.com/home-assistant/core.git
synced 2026-04-17 23:53:49 +01:00
Mark Entity.async_write_ha_state as final (#166627)
This commit is contained in:
@@ -1040,9 +1040,14 @@ class Entity(
|
|||||||
self._async_verify_state_writable()
|
self._async_verify_state_writable()
|
||||||
self._async_write_ha_state()
|
self._async_write_ha_state()
|
||||||
|
|
||||||
|
@final
|
||||||
@callback
|
@callback
|
||||||
def async_write_ha_state(self) -> None:
|
def async_write_ha_state(self) -> None:
|
||||||
"""Write the state to the state machine."""
|
"""Write the state to the state machine.
|
||||||
|
|
||||||
|
Note: Integrations which need to customize state write should
|
||||||
|
override _async_write_ha_state, not this method.
|
||||||
|
"""
|
||||||
if not self.hass or not self._verified_state_writable:
|
if not self.hass or not self._verified_state_writable:
|
||||||
self._async_verify_state_writable()
|
self._async_verify_state_writable()
|
||||||
if self.hass.loop_thread_id != threading.get_ident():
|
if self.hass.loop_thread_id != threading.get_ident():
|
||||||
|
|||||||
Reference in New Issue
Block a user