We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41f1dfe commit e0225bcCopy full SHA for e0225bc
1 file changed
custom_components/battery_notes/sensor.py
@@ -598,7 +598,7 @@ async def async_state_reported_listener(
598
# Don't update if battery level same and it's been < 1 hour
599
delta = dt_util.utcnow() - self.coordinator.last_wrapped_battery_state_write
600
if (
601
- self.coordinator.last_reported_level == wrapped_battery_state.state
+ self.coordinator.last_reported_level == float(wrapped_battery_state.state)
602
and delta.total_seconds() < STATE_WRITE_INTERVAL_SECONDS
603
):
604
self._attr_available = True
0 commit comments