ha-lta icon indicating copy to clipboard operation
ha-lta copied to clipboard

'TIME_MINUTES' Depreciation

Open wh1t35m1th opened this issue 11 months ago • 2 comments

HA core version

2025.1.0

Intergration version

0.3.0

The description of problem

Received the following error message: Platform error 'sensor' from integration 'lta' - cannot import name 'TIME_MINUTES' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

'TIME_MINUTES' constant is depreciated in HA 2024.1.0. 'UnitOfTime.MINUTES' should be used instead.

wh1t35m1th avatar Jan 12 '25 04:01 wh1t35m1th

Happened to me before. Basically, it boiled down to your sensor.py not being the latest version 0.30 (even though it may say so). I had to copy and paste the latest code manually from github to the actual sensor.py file and reboot. All was good after that.

dexmorgan8888 avatar Jan 17 '25 03:01 dexmorgan8888

Seems like the latest sensor.py in main branch has this fix, but not the latest release version 0.3.0. For others trying to replace the file manually, you can find the sensor.py in /config/custom_components/lta.

@Codestian can you create a new release from the latest main branch please?

flaskr avatar Feb 12 '25 15:02 flaskr