devbis / ble2mqtt

Bluetooth to MQTT bridge, add your bluetooth-capable (including controllable) devices to your smart home
MIT License
137 stars 26 forks source link

ruuvitag: remove device class for counter #83

Closed QuintinHill closed 8 months ago

QuintinHill commented 8 months ago

This gives an error in the logs. When implementing this I confused https://github.com/home-assistant/core/blob/d47ec9123153c6a8cc5d3644956b82e82bca8458/homeassistant/components/sensor/const.py#L70 and https://github.com/Bluetooth-Devices/sensor-state-data/blob/9ed2d0b586d4bcc93574d9de0cf5e0974509760e/src/sensor_state_data/sensor/device_class.py#L6 the latter used in the built in component handling of RuuviTags in Home Assistant the former in the Home Assistant MQTT component.

QuintinHill commented 8 months ago

Another option is that it should not be in the SENSOR_DOMAIN but in an different domain I'm not sure what it should be though.