jason0x43 / hacs-hubitat

A Hubitat integration for Home Assistant
MIT License
189 stars 46 forks source link

state_class missing after upgrading from 0.8.x to 0.9.8 #225

Closed cvinhaes closed 4 months ago

cvinhaes commented 11 months ago

Updated the integration today from an old version, hoping that the state_class would show for my existing temperature and power (from smart sockets) sensors reading from my hubitat hub, but nothing changed. Is there any additional configuration required. I've rebooted HA more than once and managed to add state_class using a global customization, but I was hoping it would come straight from the integration. Hubitat currently in v: 2.3.5.146

kevdliu commented 6 months ago

Noticed this after updating as well. Sensor entities are missing their device_class attributes. Binary sensors are working properly however.

CaptainKarma commented 6 months ago

I lost functionality for my contact and temperature/humidity sensors, had to implement a workaround to add device_class for everything to work again;

homeassistant: customizeglob: "sensor.s_battery": device_class: battery "sensor.thbattery": device_class: battery

jason0x43 commented 6 months ago

v0.9.12 fixes the missing device classes. I've also verified that sensor entities are reporting state classes. Give that a try.

xvz commented 6 months ago

I upgraded to 0.9.14, deleted and re-added my hub to check the entity generation. Device classes are working correctly now but all the entity ID suffices are missing. For example, instead of sensor.room_battery, it is just sensor.room. Similarly, instead of binary_sensor.room_water, it is binary_sensor.room. Similarly for _last_update_time, _contact, _tamper, etc.

jason0x43 commented 6 months ago

I need to write more unit tests. 🤦‍♂️

jason0x43 commented 6 months ago

That issue is fixed in 0.9.15.