Skip to content

Commit

Permalink
* Cycle duration sensor: fixed UOM in debug message, which is moved to
Browse files Browse the repository at this point in the history
  `set_duration_sensor` method
  • Loading branch information
hostcc committed Sep 9, 2024
1 parent 0db85f4 commit 02b4011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/energomera_hass_mqtt/hass_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ async def iec_read_admin(self) -> None:
else:
await self.set_online_sensor(True)
duration = time() - start
_LOGGER.debug('Cycle duration: %s ms', duration)
await self.set_duration_sensor(duration)
finally:
# Disconnect serial client ignoring possible
Expand Down Expand Up @@ -290,6 +289,7 @@ async def set_duration_sensor(self, value: float) -> None:
Adds a pseudo-sensor to HASS reflecting the duration of the meter
cycle.
"""
_LOGGER.debug('Cycle duration: %s s', value)
# Add a pseudo-sensor
param = ConfigParameterSchema(
address='CYCLE_DURATION',
Expand Down

0 comments on commit 02b4011

Please sign in to comment.