Skip to content

Commit

Permalink
refactor: Show disconnected state immediately instead of after second…
Browse files Browse the repository at this point in the history
… hicup
  • Loading branch information
davidrapan committed Dec 25, 2024
1 parent e2dc6d0 commit a2e989d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/solarman/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def available(self) -> bool:

@property
def is_on(self) -> bool | None:
return self._attr_state > -1 if self._attr_state is not None else False
return self._attr_state > 0 if self._attr_state is not None else False

def update(self):
self.set_state(self.coordinator.inverter.state.value)
Expand Down

0 comments on commit a2e989d

Please sign in to comment.