TroyFernandes / hass-mqtt-mediaplayer

Fill out your Media Player Entity with MQTT Topics
MIT License
31 stars 18 forks source link

'mqtt-mediaplayer' accesses hass.components.mqtt. This is deprecated and will stop working in Home Assistant 2024.9 #13

Closed sumoneelse closed 1 month ago

sumoneelse commented 1 month ago

Logger: homeassistant.helpers.frame Source: helpers/frame.py:184 First occurred: 8:24:22 AM (1 occurrences) Last logged: 8:24:22 AM Detected that custom integration 'mqtt-mediaplayer' 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/mqtt-mediaplayer/media_player.py, line 94: mqtt = hass.components.mqtt, please report it to the author of the 'mqtt-mediaplayer' custom integration

TroyFernandes commented 1 month ago

Thanks for the reminder. I remember seeing this notice in Jan but forgot about it. I hopefully fixed it already so I'm just gonna test it for a bit before merging.

It'll be updated before 2024.09's out

sumoneelse commented 1 month ago

When trying to update, Home Assistant errors as: "Failed to perform the action update/install. The version b7ba7c9 for this integration can not be used with HACS."

Thanks for any advice, and for updating this component. I lean on it heavily.

TroyFernandes commented 1 month ago

Interesting, I didn't seem to have this issue when running it in my main home assistant install.

I'll take a look and try to fix this.

If you are able to check, what version of HACS do you use?

In the meantime you can just manually update the contents of the media_player.py file to the updated code if you can't wait.

sumoneelse commented 1 month ago

Integration version 2.0.0 Frontend version: 20240814080035

EDIT: Manual update succeeded - thank you again!

TroyFernandes commented 1 month ago

Ok, I think everything should be good now. My main install of HA was on a different version

I guess throughout some update hacs had, it started requiring certain files with specific fields to be present inside the repo. Otherwise it won't install.

I tried installing through HACS 2.0.0 with the new files and it worked so hopefully it's fixed now.

Thanks for bringing this up, and if you run into any issues just try reinstalling the integration.

Let me know if anything else comes up.

sumoneelse commented 1 month ago

That did it. I am forever grateful for this integration. Thank you so very much for hopping back in to future-proof it. Here are some in-situ action shots. : )

PXL_20240831_110044214

Above is the control panel next to my desk in my home office which always shows my "now playing" information.

Screenshot_20240831-065806

And in my main home assistant dashboard, I have a panel that shows remote-control cards for any turned-on/active player, television, or plex player in my house. It is rare I actually need to find a physical remote.

TroyFernandes commented 1 month ago

Lookin good!

Glad everything's working for you properly now.