gpulido / homeassistant-selve

Home Assistant Custom component to manage Selve devices
MIT License
3 stars 3 forks source link

Integration break after upgrading HA to 2024.7.2 #18

Closed marius4g closed 3 months ago

marius4g commented 3 months ago

Hi,

First thanks for all your work. All was just working up to last upgrade. The error I am getting is:

Logger: selve Source: /usr/local/lib/python3.12/site-packages/selve/init.py:92 First occurred: July 15, 2024 at 18:51:39 (1 occurrences) Last logged: July 15, 2024 at 18:51:39

error communicating...: Caught blocking call to sleep with args (0.5,) inside the event loop by custom integration 'selve' at custom_components/selve/cover.py, line 37: gateway.discover(). (offender: /usr/local/lib/python3.12/site-packages/selve/init.py, line 80: time.sleep(0.5)), please report it to the author of the 'selve' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#sleep Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/selve/init.py", line 80, in executeCommand time.sleep(0.5) File "/usr/src/homeassistant/homeassistant/util/loop.py", line 192, in protected_loop_func raise_for_blocking_call( File "/usr/src/homeassistant/homeassistant/util/loop.py", line 158, in raise_for_blocking_call raise RuntimeError( RuntimeError: Caught blocking call to sleep with args (0.5,) inside the event loop by custom integration 'selve' at custom_components/selve/cover.py, line 37: gateway.discover(). (offender: /usr/local/lib/python3.12/site-packages/selve/init.py, line 80: time.sleep(0.5)), please report it to the author of the 'selve' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#sleep


On top of that I am getting some warnings for which, probably we'll need to prepare, even there is enough time in front of us: Logger: homeassistant.components.cover Source: helpers/deprecation.py:197 integration: Cover (documentation, issues) First occurred: July 15, 2024 at 18:51:38 (22 occurrences) Last logged: July 15, 2024 at 18:51:38

SUPPORT_SET_TILT_POSITION was used from selve, this is a deprecated constant which will be removed in HA Core 2025.1. Use CoverEntityFeature.SET_TILT_POSITION instead, please report it to the author of the 'selve' custom integration DEVICE_CLASS_WINDOW was used from selve, this is a deprecated constant which will be removed in HA Core 2025.1. Use CoverDeviceClass.WINDOW instead, please report it to the author of the 'selve' custom integration DEVICE_CLASS_BLIND was used from selve, this is a deprecated constant which will be removed in HA Core 2025.1. Use CoverDeviceClass.BLIND instead, please report it to the author of the 'selve' custom integration DEVICE_CLASS_AWNING was used from selve, this is a deprecated constant which will be removed in HA Core 2025.1. Use CoverDeviceClass.AWNING instead, please report it to the author of the 'selve' custom integration DEVICE_CLASS_SHUTTER was used from selve, this is a deprecated constant which will be removed in HA Core 2025.1. Use CoverDeviceClass.SHUTTER instead, please report it to the author of the 'selve' custom integration

and that one.... Logger: homeassistant.helpers.typing Source: helpers/deprecation.py:197 First occurred: July 15, 2024 at 18:51:39 (1 occurrences) Last logged: July 15, 2024 at 18:51:39

HomeAssistantType was used from selve, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant instead, please report it to the author of the 'selve' custom integration


Can we have a fix for that or a workaround, please. With kind regards, Marius

gpulido commented 3 months ago

Hello, I will review and try to update the python selve component at seems to be the offending one, any MR is also welcome. Regarding the other issues will also review to change but after solving this. Thanks for reporting it

gpulido commented 3 months ago

Hello, I have just created a new branch SolveCompatibility2407 that should resolve all the compatibility versions that you pointed out. Please let me know if it worked for you. I will integrate in master then. Regards Gabriel

marius4g commented 3 months ago

Hello Gabriel,

Sorry for the delay on testing. I had some hot days at work and came home exhausted. Few min ago I integrate your changes and all looks nice: no warnings, no errors and the HA can see the shutters and place the commands.

Thanks a lot for your kind and fast support. With kind regards, Marius