jdeath / rd200v2

RadonEye RD200 Version 2 Integration for Home Assistant
MIT License
73 stars 17 forks source link

V1 uptime value is in minutes but unit shows seconds #22

Closed stleusc closed 11 months ago

stleusc commented 11 months ago

re my change in #21:

The data I push into radon_uptime is in minutes. The sensor definition is in seconds.

Either my value needs to be scaled or the unit could be changed. Using seconds might not make much sense since the senser only updates every few minutes. So maybe the V2 data could be changed to mintues and the senor then adapted as well?

"radon_uptime": SensorEntityDescription(
    key="radon_uptime",
    native_unit_of_measurement=UnitOfTime.SECONDS,
    name="Radon Uptime",
    state_class=SensorStateClass.MEASUREMENT,
    icon="mdi:timer-outline",
),
jdeath commented 11 months ago

I just multiplied v1 by 60 to keep in seconds. Thanks. I'll do a new release shortly

Closed with #d6b3ad7