Skip to content

Commit

Permalink
fix: Set of configurables to 0 did not update state in HA
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Dec 10, 2024
1 parent eb2a141 commit 5d4c337
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/solarman/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async def write(self, value, state = None) -> None:
if isinstance(value, list):
while len(self.registers) > len(value):
value.insert(0, 0)
if await self.coordinator.inverter.call(self.code, self.register, value) > 0 and state:
if await self.coordinator.inverter.call(self.code, self.register, value) > 0 and state is not None:
self.set_state(state, value)
self.async_write_ha_state()
#await self.entity_description.update_fn(self.coordinator., int(value))
Expand Down

0 comments on commit 5d4c337

Please sign in to comment.