Drakulix / googlehome

Google Home Integration for Home-Assistant
Apache License 2.0
29 stars 3 forks source link

Issues with 2021.4.x update of Home Assistant #24

Closed Leatherface75 closed 2 years ago

Leatherface75 commented 3 years ago

Already broken in 2021.4.x versions of Home Assistant.

Unable to prepare setup for platform googlehome.sensor: Platform not found (cannot import name 'KNOWN_CHROMECAST_INFO_KEY' from 'homeassistant.components.cast.const' (/usr/src/homeassistant/homeassistant/components/cast/const.py)).

Seems to be these changes in cast component.

https://github.com/home-assistant/core/commit/3188f796f9deed2310ba372b2e8d0ad35dc1e3ef#diff-9f9ae1a943d854c865ae813557708925d1eb8eab74536354fb945b99a68fd5da

ha-google-home seems to lack interest to implement bluetooth presence and that's one of the more important things for me. Best maybe would be if you could implement it in their component.

Drakulix commented 3 years ago

Well, if you want to update this component to make it work again, I will merge any fix and release a new version. It should be rather easy to fix, just remove line 26 and 27 from https://github.com/Drakulix/googlehome/blob/master/custom_components/googlehome/helpers.py#L26 and test if it works again.

But of course adding it to ha-google-home would be better, but that requires significant rework. The current solution to device_tracking in this component relies on multiple deprecated functions of home-assistant causing various issues. While it may work fine for you, ha-google-home will not integrate device-tracking at this state. I personally only kept it in this component, because the original ha-component had it. I have no use for it personally and while I want to help porting it to ha-google-home eventually, I lack free time right now.

I am sorry, but you have to live with resurrecting this component for every breaking update, until someone picks up the work or you try to do that yourself.

Leatherface75 commented 3 years ago

I guess it wasn't that easy there is a few other places i found it so i'll try to remove it.

Leatherface75 commented 2 years ago

Have you looked anything at this yet?

Leatherface75 commented 2 years ago

ping @Drakulix

Drakulix commented 2 years ago

Did removing all occurrences of KNOWN_CHROMECAST_INFO_KEY not work?

Leatherface75 commented 2 years ago

No didn't work. I think it needs to be replaced with something else.

Drakulix commented 2 years ago

So what is the issue now? Does it still not start?

Leatherface75 commented 2 years ago

It starts but can't find any sensors etc because it fails getting information. I have removed plugin now so i don't have the logs right now.

Drakulix commented 2 years ago

I feared, that this would be the case. Very unfortunate, but there is not much I can do about it. This integration never had its own discovery logic, but relied on the googlecast integration instead.

I do not have the time to figure out, how this works now as it does not look that easy anymore. I also do not want to implement my own logic at this point. ha-google-home has it and we should likely work on that https://github.com/leikoilja/ha-google-home/issues/123 instead.

Leatherface75 commented 2 years ago

Yeah but seems they need help to fix this. I agree that integration there would be better.

Drakulix commented 2 years ago

Yeah but seems they need help to fix this. I agree that integration there would be better.

I think mostly this needs time. Developer time, which is sparse. If you want to implement this yourself, I am sure someone will be able to mentor you.

Leatherface75 commented 2 years ago

I would do it if i had enough knowledge for that.

leikoilja commented 2 years ago

@Leatherface75, i encourage you to try playing around with the code for https://github.com/leikoilja/ha-google-home/issues/123, figuring out what can be done to implement it. If you get stuck with anything, feel free to open pull request with draft state and ask questions/comments and i m sure most of us will be very happy to help out. Someone just needs to dive in and take a responsibility over it :)

Leatherface75 commented 2 years ago

@Leatherface75, i encourage you to try playing around with the code for leikoilja/ha-google-home#123, figuring out what can be done to implement it. If you get stuck with anything, feel free to open pull request with draft state and ask questions/comments and i m sure most of us will be very happy to help out. Someone just needs to dive in and take a responsibility over it :)

Sorry i dont't have much knowledge how to do that. I can only do some small easy changes and copy/paste with the code. That's my knowledge of programming.

I see this is a step to implement this but that patch doesn't work anymore with latest releases. https://github.com/leikoilja/ha-google-home/pull/266