py-smart-gardena / hass-gardena-smart-system

Home Assistant custom component integration for Gardena Smart System
Apache License 2.0
213 stars 53 forks source link

Change the device class of the smart sensor from humidity to moisture #216

Closed DNier closed 2 months ago

DNier commented 5 months ago

Fixes https://github.com/py-smart-gardena/hass-gardena-smart-system/issues/213

grm commented 2 months ago

Thx for the PR, I merge it. !

Bucky2k commented 2 months ago

Sorry, this is actually not working on my side just yet. Moisture is not exposed by the integration, the entity is invalid.

@grm info @DNier Any idea what could be wrong? The new entity shows up, but does not contain a valid state. It's not fed by the sensor

I have a mower and one soil sensor Screenshot_20240903_080534_Home Assistant

Bucky2k commented 2 months ago

Screenshot_20240903_080725_Home Assistant

crazyfx1 commented 2 months ago

The py-smart-gardena lib does not return "soil_moisture" but still "soil_humidity". Either change it back or adapt the library and push a new version: https://github.com/py-smart-gardena/py-smart-gardena/blob/master/src/gardena/devices/soil_sensor.py