meichthys / uptime_kuma

Uptime Kuma HACS integration
105 stars 24 forks source link

If you disable sensors through Home Assistant they come back after reload #82

Open skynet01 opened 9 months ago

skynet01 commented 9 months ago

Love this integration, I monitor around 30 things with it. I know the integration creates a binary_sensor and a regular sensor for each monitor. I don't need a normal sensor, so I disable them, but they all come back after a day or so. I think it's tied to Uptime Kuma itself reloading and not an integration reload.

Thank you for looking into this

meichthys commented 9 months ago

I'll have to take a closer look, but I think this is expected since the entities are re-created each time HA polls UptimeKuma. It was designed this way so you wouldn't have to manually add sensors to Homeassistant after updating UptimeKuma with a new monitor.

skynet01 commented 9 months ago

Ah makes sense, maybe there can be an option to not create the sensor entities at all? :)

meichthys commented 9 months ago

I meant to say that the sensors and binary_sensors are re-created each time, but yes, I could see some people preferring just the binary_sensors. You can file that as a separate issue.

This current issue about sensors not staying hidden may be able to be worked around by first checking if a hidden entity exists with the same id, if so, don't re-create it, but i'm just speculating here. I'd have to take a closer look at it (or maybe someone else would be willing to?).

skynet01 commented 9 months ago

Gotcha, ill make another request :)