gicamm / homeassistant-comelit

With Comelit Hub/Vedo integration, you can connect your Home Assistant instance to Comelit Simple Home and Vedo systems.
Apache License 2.0
23 stars 7 forks source link

Replace Device Classes with SensorDeviceClass #63

Closed gicamm closed 5 months ago

gicamm commented 7 months ago

Device classes are deprecated. We need to replace them with 'SensorDeviceClass' before 2025.

DEVICE_CLASS_AQI: Final = "aqi"
DEVICE_CLASS_BATTERY: Final = "battery"
DEVICE_CLASS_CO: Final = "carbon_monoxide"
DEVICE_CLASS_CO2: Final = "carbon_dioxide"
DEVICE_CLASS_CURRENT: Final = "current"
DEVICE_CLASS_DATE: Final = "date"
DEVICE_CLASS_ENERGY: Final = "energy"
DEVICE_CLASS_FREQUENCY: Final = "frequency"
DEVICE_CLASS_GAS: Final = "gas"
DEVICE_CLASS_HUMIDITY: Final = "humidity"
DEVICE_CLASS_ILLUMINANCE: Final = "illuminance"
DEVICE_CLASS_MONETARY: Final = "monetary"
DEVICE_CLASS_NITROGEN_DIOXIDE = "nitrogen_dioxide"
DEVICE_CLASS_NITROGEN_MONOXIDE = "nitrogen_monoxide"
DEVICE_CLASS_NITROUS_OXIDE = "nitrous_oxide"
DEVICE_CLASS_OZONE: Final = "ozone"
DEVICE_CLASS_PM1: Final = "pm1"
DEVICE_CLASS_PM10: Final = "pm10"
DEVICE_CLASS_PM25: Final = "pm25"
DEVICE_CLASS_POWER_FACTOR: Final = "power_factor"
DEVICE_CLASS_POWER: Final = "power"
DEVICE_CLASS_PRESSURE: Final = "pressure"
DEVICE_CLASS_SIGNAL_STRENGTH: Final = "signal_strength"
DEVICE_CLASS_SULPHUR_DIOXIDE = "sulphur_dioxide"
DEVICE_CLASS_TEMPERATURE: Final = "temperature"
DEVICE_CLASS_TIMESTAMP: Final = "timestamp"
DEVICE_CLASS_VOLATILE_ORGANIC_COMPOUNDS = "volatile_organic_compounds"
DEVICE_CLASS_VOLTAGE: Final = "voltage"

DEVICE_CLASS_TEMPERATURE -> SensorDeviceClass.TEMPERATURE DEVICE_CLASS_TEMPERATURE -> SensorDeviceClass.HUMIDITY

Marcoletto commented 6 months ago

Ciao, posso farlo io per darti una mano? Se mi dici dove modificare mi ci metto io.

gicamm commented 6 months ago

Hi, this is a WIP. I have been doing some work. I need to finish them, but I have been too busy. I apologise. Anyway, there is a branch for this. So you can look at it.

gicamm commented 6 months ago

I have made the change. Code is in master. Will be tagged after some feedback. Also available in 0.9.8-beta1

gicamm commented 5 months ago

Close as code has been merged