Heatmiser-for-home-assistant icon indicating copy to clipboard operation
Heatmiser-for-home-assistant copied to clipboard

Clean up: Deprecated constants log error in Home Assistant 2024.1

Open jamespreedy opened this issue 1 year ago • 13 comments

Version of the custom_component

Latest version on HACS - 0d4905c

Configuration

Logger: homeassistant.components.climate.const
Source: helpers/deprecation.py:204
Integration: Climate (documentation, issues)
First occurred: 7:57:45 am (14 occurrences)
Last logged: 7:57:46 am

HVAC_MODE_HEAT was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT instead, please report it to the author of the 'heatmiserneo' custom integration
HVAC_MODE_HEAT_COOL was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT_COOL instead, please report it to the author of the 'heatmiserneo' custom integration
HVAC_MODE_OFF was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.OFF instead, please report it to the author of the 'heatmiserneo' custom integration
SUPPORT_TARGET_TEMPERATURE was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'heatmiserneo' custom integration
SUPPORT_TARGET_TEMPERATURE_RANGE was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE_RANGE instead, please report it to the author of the 'heatmiserneo' custom integration


Logger: homeassistant.const
Source: helpers/deprecation.py:204
First occurred: 7:57:45 am (26 occurrences)
Last logged: 7:57:48 am

TEMP_CELSIUS was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'heatmiserneo' custom integration
TEMP_FAHRENHEIT was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.FAHRENHEIT instead, please report it to the author of the 'heatmiserneo' custom integration

Describe the bug

See above logs - various constants used in the custom component will be depreciated in a future version of Home Assistant. I appreciate this is something that everyone will see, but if I can help with any additional logs etc, please let me know - I'll be happy to help how I can.

jamespreedy avatar Jan 04 '24 08:01 jamespreedy

Thanks @jamespreedy It's a good shout, I cleaned up a few of these in the dev branch. I'll look at clearing out the rest.

MindrustUK avatar Jan 08 '24 10:01 MindrustUK

Thank you! 🍺

jamespreedy avatar Jan 08 '24 10:01 jamespreedy

Hi there are a few more HVAC_MODE_COOL was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1 HVAC_MODE_FAN_ONLY was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. CURRENT_HVAC_COOL was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. CURRENT_HVAC_HEAT was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. CURRENT_HVAC_IDLE was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. HVAC_MODE_FAN_ONLY was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. HVAC_MODE_OFF TEMP_CELSIUS TEMP_FAHRENHEIT DEVICE_CLASS_PROBLEM DEVICE_CLASS_BATTERY

anthonyc2020 avatar Mar 06 '24 08:03 anthonyc2020

These are still showing up for me:

2024-04-08 15:34:44.121 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_COOL was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.COOLING instead, please report it to the author of the 'heatmiserneo' custom integration
2024-04-08 15:34:44.124 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_HEAT was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.HEATING instead, please report it to the author of the 'heatmiserneo' custom integration
2024-04-08 15:34:44.126 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_IDLE was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.IDLE instead, please report it to the author of the 'heatmiserneo' custom integration
2024-04-08 15:34:44.128 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_COOL was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.COOL instead, please report it to the author of the 'heatmiserneo' custom integration
2024-04-08 15:34:44.130 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_FAN_ONLY was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.FAN_ONLY instead, please report it to the author of the 'heatmiserneo' custom integration
2024-04-08 15:34:44.132 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_HEAT was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT instead, please report it to the author of the 'heatmiserneo' custom integration
2024-04-08 15:34:44.134 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_HEAT_COOL was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT_COOL instead, please report it to the author of the 'heatmiserneo' custom integration
2024-04-08 15:34:44.136 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_OFF was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.OFF instead, please report it to the author of the 'heatmiserneo' custom integration
2024-04-08 15:34:44.139 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_TARGET_TEMPERATURE was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'heatmiserneo' custom integration
2024-04-08 15:34:44.141 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] SUPPORT_TARGET_TEMPERATURE_RANGE was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE_RANGE instead, please report it to the author of the 'heatmiserneo' custom integration

spitfire avatar Apr 08 '24 13:04 spitfire

@MindrustUK - hey mate, I have the same as the above. Assume not, but are there any debug logs I can provide you or anything I can do to help with this one? Thanks in advance!

jamespreedy avatar Apr 08 '24 14:04 jamespreedy

Hi,

Sorry I just reported the problem I am not going to fix it that should be done by the guys supporting this project.

Regards Anthony

From: James Preedy @.> Sent: Monday, April 8, 2024 3:24 PM To: MindrustUK/Heatmiser-for-home-assistant @.> Cc: anthonyc2020 @.>; Comment @.> Subject: Re: [MindrustUK/Heatmiser-for-home-assistant] Clean up: Deprecated constants log error in Home Assistant 2024.1 (Issue #154)

@MindrustUKhttps://github.com/MindrustUK - hey mate, I have the same as the above. Assume not, but are there any debug logs I can provide you or anything I can do to help with this one? Thanks in advance!

Reply to this email directly, view it on GitHubhttps://github.com/MindrustUK/Heatmiser-for-home-assistant/issues/154#issuecomment-2042892832, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYKB6QGPDXV5T2FUJTNT7EDY4KSA3AVCNFSM6AAAAABBMRNWCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBSHA4TEOBTGI. You are receiving this because you commented.Message ID: @.***>

anthonyc2020 avatar Apr 08 '24 15:04 anthonyc2020

Should be clear on the Dev branch. Please give it a go and feedback.

MindrustUK avatar Apr 09 '24 14:04 MindrustUK

Hi,

I only replaced climate.py from dev branch, This resulted in a few less messages after restart but still the ones listed in included file.

Regards and thanks for the work.

Anthony

From: MindrustUK @.> Sent: Tuesday, April 9, 2024 3:45 PM To: MindrustUK/Heatmiser-for-home-assistant @.> Cc: anthonyc2020 @.>; Comment @.> Subject: Re: [MindrustUK/Heatmiser-for-home-assistant] Clean up: Deprecated constants log error in Home Assistant 2024.1 (Issue #154)

Should be clear on the Dev branch. Please give it a go and feedback.

Reply to this email directly, view it on GitHubhttps://github.com/MindrustUK/Heatmiser-for-home-assistant/issues/154#issuecomment-2045361931, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYKB6QD4JCGAR2NGTXUK4V3Y4P5G3AVCNFSM6AAAAABBMRNWCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVGM3DCOJTGE. You are receiving this because you commented.Message ID: @.***>

2024-04-09 17:48:44.419 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_COOL was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.COOL instead, please report it to the author of the 'heatmiserneo' custom integration 2024-04-09 17:48:44.426 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_FAN_ONLY was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.FAN_ONLY instead, please report it to the author of the 'heatmiserneo' custom integration 2024-04-09 17:48:44.433 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_HEAT was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT instead, please report it to the author of the 'heatmiserneo' custom integration 2024-04-09 17:48:44.443 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_HEAT_COOL was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT_COOL instead, please report it to the author of the 'heatmiserneo' custom integration 2024-04-09 17:48:52.297 WARNING (ImportExecutor_0) [homeassistant.components.binary_sensor] DEVICE_CLASS_PROBLEM was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use BinarySensorDeviceClass.PROBLEM instead, please report it to the author of the 'heatmiserneo' custom integration 2024-04-09 17:48:52.286 ERROR (MainThread) [homeassistant.components.climate] Error while setting up heatmiserneo platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/heatmiserneo/climate.py", line 69, in async_setup_entry thermostats = {device.name: device for device in devices_data['neo_devices']} ~~~~~~~~~~~~^^^^^^^^^^^^^^^ KeyError: 'neo_devices' 2024-04-09 17:48:52.313 WARNING (ImportExecutor_0) [homeassistant.components.binary_sensor] DEVICE_CLASS_PROBLEM was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use BinarySensorDeviceClass.PROBLEM instead, please report it to the author of the 'heatmiserneo' custom integration 2024-04-09 17:48:52.327 WARNING (ImportExecutor_0) [homeassistant.components.sensor] DEVICE_CLASS_BATTERY was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.BATTERY instead, please report it to the author of the 'heatmiserneo' custom integration 2024-04-09 17:48:52.336 WARNING (ImportExecutor_0) [homeassistant.components.sensor] DEVICE_CLASS_BATTERY was used from heatmiserneo, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.BATTERY instead, please report it to the author of the 'heatmiserneo' custom integration

anthonyc2020 avatar Apr 09 '24 17:04 anthonyc2020

You've mixed files from two different branches. This will cause chaos as the branches have deviated significantly. Please use one or the other.

MindrustUK avatar Apr 09 '24 18:04 MindrustUK

@MindrustUK - thanks for the advice and help as always. 😀

I don't normally jump onto Dev branches, but I'm tempted to give it a shot here for fun! Is there anything in particular I would need to change in HA for dev to work properly, or will all my entities etc remain intact? Is this dev branch far away from becoming the main?

Thanks again ...

jamespreedy avatar Apr 09 '24 19:04 jamespreedy

@jamespreedy Unfortunately I'm pretty sure entities etc will be renamed. The original code didn't name devices with unique ID's in a consistent manner, I've addressed this as part of the Dev re-factor.

Everything 'should' work with the notable exception of the "Neoplug" devices. There's also a whole bunch of optional controls that have been added which maybe "noisy" for some users, I plan on adding some options around configuration options for these.

As for how far away the dev branch is from becoming main, it's really the two points above that need completing (from memory); the NeoPlug implementation and adding a new config flow. Due to a lack of time I'm focusing any work I do on the dev branch and only touching main if anything significant breaks. My contributions at present are limited for various reasons.

Probably best to spin up a test virtual machine and give the Dev branch a go and see if you can live with it before changing deployments.

MindrustUK avatar Apr 10 '24 10:04 MindrustUK

@MindrustUK - great answer. I'll give it a shot and see how it goes.

Thank you again, and for all the work you do on this integration. Appreciate there's never enough time in the day, and priorities are often elsewhere.

Do you have a buymeacoffee.com account or similar at all?

jamespreedy avatar Apr 10 '24 10:04 jamespreedy

@jamespreedy I've got https://ko-fi.com/MindrustUK and https://liberapay.com/MindrustUK for support, I really need to find the time to finish the Github sponsorship program paperwork. Appreciate the support, thanks!

MindrustUK avatar Apr 10 '24 10:04 MindrustUK

Closing complete.

MindrustUK avatar Aug 28 '24 12:08 MindrustUK