barleybobs / homeassistant-ecowater-softener

A Homeassistant custom component to integrate Ecowater water softeners
https://github.com/barleybobs/homeassistant-ecowater-softener
MIT License
31 stars 9 forks source link

Deprecation warnings (due until 2025.1) #50

Closed R1DEN closed 4 months ago

R1DEN commented 6 months ago

Got this error message in the logs

Logger: homeassistant.const
Source: helpers/deprecation.py:204
First occurred: 4 January 2024 at 09:05:46 (5 occurrences)
Last logged: 4 January 2024 at 09:05:57

VOLUME_LITERS was used from ecowater_softener, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfVolume.LITERS instead, please create a bug report at https://github.com/barleybobs/homeassistant-ecowater-softener/issues
VOLUME_GALLONS was used from ecowater_softener, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfVolume.GALLONS instead, please create a bug report at https://github.com/barleybobs/homeassistant-ecowater-softener/issues
TIME_DAYS was used from ecowater_softener, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTime.DAYS instead, please create a bug report at https://github.com/barleybobs/homeassistant-ecowater-softener/issues
figorr commented 6 months ago

I found the same issue when I updated HA Core to 2024.1 yesterday.

I sent a pull request in order to modify the sensor.py file to try to solve this.

The commit 2d1af86a59b498034b4c1bc0408df05e8c864351 should solve the issue.

I have no time to test it yet, because I am outside home and I cannot access through ssh. But if you want ... you can make a backup of your sensor.py file, just for there is an error and you need to recover it. Then you can edit the sensor.py file and restart Home Assistant to apply changes. It should work ... but if there is any error ... you can always recover your sensor.py backup file ... and restart Home Assistant to apply the changes.

barleybobs commented 4 months ago

This has been fixed by pull request #49.

Thanks 👍