Make iot time timezone aware (#1147)

Also makes on_since for iot devices use device time.
Changes the return value for device.timezone to be tzinfo instead of a dict.
This commit is contained in:
Steven B.
2024-10-08 08:16:51 +01:00
committed by GitHub
parent 8bb2cca7cf
commit 9641edcbc0
22 changed files with 289 additions and 45 deletions

View File

@@ -40,7 +40,7 @@ async def state(ctx, dev: Device):
echo(f"Port: {dev.port}")
echo(f"Device state: {dev.is_on}")
echo(f"Time: {dev.time} (tz: {dev.timezone}")
echo(f"Time: {dev.time} (tz: {dev.timezone})")
echo(f"Hardware: {dev.hw_info['hw_ver']}")
echo(f"Software: {dev.hw_info['sw_ver']}")
echo(f"MAC (rssi): {dev.mac} ({dev.rssi})")