hass-egauge
hass-egauge copied to clipboard
Update unit constants to new format
Version 0.4.1
Describe the bug
New versions of HomeAssistant are introducing new unit constants, and current unit constants are planned for deprecation in version 2025.1 (a ways out, for sure). Current operation is not impacted.
Full log below, but the constants that need to be changed are:
- ELECTRIC_POTENTIAL_VOLT -> UnitOfElectricPotential.VOLT
- ENERGY_KILO_WATT_HOUR -> UnitOfEnergy.KILO_WATT_HOUR
- POWER_WATT -> UnitOfPower.WATT
- PRESSURE_PA -> UnitOfPressure.PA
- TEMP_CELSIUS -> UnitOfTemperature.CELSIUS
- STATE_CLASS_MEASUREMENT -> SensorStateClass.MEASUREMENT
- STATE_CLASS_TOTAL_INCREASING -> SensorStateClass.TOTAL_INCREASING
Debug log
ELECTRIC_POTENTIAL_VOLT was used from egauge, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricPotential.VOLT instead, please create a bug report at https://github.com/neggert/egauge/issues
ENERGY_KILO_WATT_HOUR was used from egauge, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.KILO_WATT_HOUR instead, please create a bug report at https://github.com/neggert/egauge/issues
POWER_WATT was used from egauge, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead, please create a bug report at https://github.com/neggert/egauge/issues
PRESSURE_PA was used from egauge, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPressure.PA instead, please create a bug report at https://github.com/neggert/egauge/issues
TEMP_CELSIUS was used from egauge, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/neggert/egauge/issues
STATE_CLASS_MEASUREMENT was used from egauge, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please create a bug report at https://github.com/neggert/egauge/issues
STATE_CLASS_TOTAL_INCREASING was used from egauge, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please create a bug report at https://github.com/neggert/egauge/issues