Blueforcer / awtrix3

Custom firmware for the Ulanzi Smart Pixel clock or self made awtrix. Getting started is easy as 1-2-3
https://blueforcer.github.io/awtrix3/
Other
1.25k stars 108 forks source link

[BUG] Uptime sensor format #44

Closed tjorim closed 1 year ago

tjorim commented 1 year ago

Bug report

Describe the bug

Uptime has a non-conventional format. This way it has a lot of state changes. It would be better to have a fixed boot time or something, we can still calculate the delta.

Additional information

To Reproduce

Add device to HA.

Expected behavior

No warnings.

Logs


Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:597
Integration: Sensor (documentation, issues)
First occurred: 5:11:25 AM (2 occurrences)
Last logged: 5:11:25 AM

Sensor sensor.uptime has device class duration, state class None and unit None thus indicating it has a numeric value; however, it has the non-numeric value: P0DT7H16M31S (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
Sensor sensor.uptime_2 has device class duration, state class None and unit None thus indicating it has a numeric value; however, it has the non-numeric value: P0DT7H16M31S (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22```
Blueforcer commented 1 year ago

It's not a bug. It's a conventional ISO 8601 Format. You can use a template to change it in whatever you want. You can also disable this sensor and use the availability to get the time when awtrix gets online.