neggert / hass-egauge

Home Assistant custom component for eGauge monitor
MIT License
15 stars 2 forks source link

Update unit constants to new format #315

Open phidauex opened 6 months ago

phidauex commented 6 months ago

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:

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
phidauex commented 6 months ago

Here is a commit to another integration showing a similar change with the new constant and an updated import line, in case it is helpful: https://github.com/Limych/ha-average/commit/7bcdbdde2cdd5ca7c5be71a6d6a3d9a695c42abc

pewhite22 commented 5 months ago

Is there any plans to update this integration? It was working nicely for me before. I'd update it myself, but I'm dumb :D

homewirelessguy commented 2 months ago

This is an awesome integration! Please consider updating it to solve the #315 issue above. Thank you.

billraff commented 1 month ago

Would also request this be updated if possible before the new year. Awesome integration.