HASwitchPlate / openHASP-custom-component

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

hass.components.mqtt will be deprecated #122

Closed akloeckner closed 6 months ago

akloeckner commented 6 months ago

Version of the custom_component

0.7.2 ## Configuration ```yaml Add your config here. ``` ## Describe the bug Apparently, we are using a deprecated internal Hass function. Warnings appear in HA 2024.4.3, asking me to open this issue. ## Debug log

2024-05-05 22:45:50.486 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'openhasp' accesses hass.components.mqtt. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from mqtt directly at custom_components/openhasp/__init__.py, line 394: await self.hass.components.mqtt.async_subscribe(, please create a bug report at https://github.com/HASwitchPlate/openHASP-custom-component/issues
fvanroie commented 6 months ago

@dgomes Is this something you can update please?

dgomes commented 6 months ago

Fixed by https://github.com/HASwitchPlate/openHASP-custom-component/commit/d36d97dd0898d746915474915572abba6c29cf08

fvanroie commented 6 months ago

Thanks for your fast response!

fvanroie commented 6 months ago

I made a 0.7.3 pre-release and also set 0.7.2 as latest version.

@akloeckner Please test 0.7.3 and if all is well, that will be the latest release, sometime next week.

akloeckner commented 6 months ago

Seems to be fine: the warning is gone. 👍

fvanroie commented 6 months ago

Thanks!