HASwitchPlate / openHASP-custom-component

Home Assistant custom component for openHASP
https://www.openhasp.com
MIT License
49 stars 9 forks source link

Home Assistant 2024.1 warnings #113

Closed nagyrobi closed 1 month ago

nagyrobi commented 5 months ago

Version of the custom_component

Latest.

Configuration


N/A

Describe the bug

Warnings from HA. Not the only custom component with these.

Debug log


2024-01-05 21:20:03.055 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPBackLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 1> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.055 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPMoodLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 17> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.061 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPBackLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 1> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.061 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPMoodLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 17> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.064 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPBackLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 1> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.064 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPMoodLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 17> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.171 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPBackLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 1> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.171 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPMoodLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 17> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.187 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPBackLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 1> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.187 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPMoodLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 17> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.574 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPBackLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 1> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-01-05 21:20:03.574 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.openhasp.light.HASPMoodLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 17> and color modes, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
LuisThe0ne commented 5 months ago

Same issue here. The logs suggest mentioning the following page: https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

fvanroie commented 4 months ago

These warnings are now fixed in Pre-Release 0.7.2. Please help test it before release by redownloading this version of the Custom Component in HACS.

KrasnovES commented 3 months ago

After updating to version 0.7.2, the component stopped working

2024-03-06 01:16:48.142 ERROR (MainThread) [homeassistant.components.script] Script with object id 'plate04_timer_popup' could not be validated and has been disabled: template value should be a string for dictionary value @ data['sequence'][0]['data']. Got {'keyword': 'jsonl', 'parameters': '{"page":0,"id":150,"obj":"obj","x":85,"y":90,"w":310,"h":340,"radius":15,"click":true,"border_side":0,"bg_color":"#0B61A4"} {"page":0,"id":151,"parentid":150,"obj":"label","x":10,"y":10,"w":48,"h":50,"click":false,"text":"{{ entity_icon }}","text_color":"#FFF","text_font":48} {"page":0,"id":152,"parentid":150,"obj":"label","x":0,"y":18,"h":30,"w":320,"align":"center","text_color":"#fff","text_font": 24,"text":"{{ entity_name }}"} {"page":0,"id":153,"parenti... 2024-03-06 01:17:39.519 ERROR (MainThread) [homeassistant.components.light] Platform openhasp does not generate unique IDs. ID 3030f973b8d4., already exists - ignoring light.plate04_light_2 2024-03-06 01:17:39.521 ERROR (MainThread) [homeassistant.components.light] Platform openhasp does not generate unique IDs. ID 3030f973b8d4.[ already exists - ignoring light.plate04_light 2024-03-06 01:17:39.521 ERROR (MainThread) [homeassistant.components.light] Platform openhasp does not generate unique IDs. ID 3030f973b8d4.] already exists - ignoring light.plate04_light_3 2024-03-06 01:17:39.527 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up openhasp platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/openhasp/binary_sensor.py", line 42, in async_setup_entry for gpio in entry.data[CONF_INPUT][device_class]


TypeError: string indices must be integers, not 'str'
2024-03-06 01:17:39.670 ERROR (MainThread) [homeassistant.util.logging] Exception in lwt_message_received when handling msg on 'hasp/plate04/LWT': 'online'
Traceback (most recent call last):
  File "/config/custom_components/openhasp/__init__.py", line 475, in lwt_message_received
    await self.refresh()
  File "/config/custom_components/openhasp/__init__.py", line 630, in refresh
    await self.async_change_page(self._page)
  File "/config/custom_components/openhasp/__init__.py", line 564, in async_change_page
    if page <= 0 or page > num_pages:
                    ^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'int' and 'str'
fvanroie commented 3 months ago

Thanks for you report. We've updated the discovery and published a new pre-release of 0.7.2 ee7172a . That should fix the problem.

fvanroie commented 1 month ago

Can this issue be closed now?