Skip to content

Commit

Permalink
Merge pull request #60 from Snuffy2/Change-async_update_ha_state-to-a…
Browse files Browse the repository at this point in the history
…sync_write_ha_state

Change to async_write_ha_state
  • Loading branch information
enkama authored May 31, 2023
2 parents 4f30c73 + 104fe8d commit de8afbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/variable/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,4 @@ async def async_update_variable(
else:
self._attr_is_on = value

await self.async_update_ha_state()
self.async_write_ha_state()
2 changes: 1 addition & 1 deletion custom_components/variable/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,6 @@ async def async_update_variable(
)
self._attr_native_value = value

await self.async_update_ha_state()
self.async_write_ha_state()
_LOGGER.debug(f"({self._attr_name}) [async_update_variable] self: {self}")
_LOGGER.debug(f"({self._attr_name}) [async_update_variable] name: {self.name}")

0 comments on commit de8afbc

Please sign in to comment.