jomwells / ambilights

Custom Home Assistant (Light) Component for Ambilight LED's on Philips Android TV's
48 stars 20 forks source link

Is it worth combining with the media_player component? #16

Open foxy82 opened 3 years ago

foxy82 commented 3 years ago

Is it worth combining this with the media player component (https://github.com/nstrelow/ha_philips_android_tv)

The main thing I'm thinking of is that you say there is an issue here with the TV going to sleep but that looks to be solved in the media player version here: https://github.com/nstrelow/ha_philips_android_tv/blob/0ee38e1974fda8456e715f7f900fe1effb976a30/custom_components/philips_android_tv/media_player.py#L149

So making this component also have access to that code might fix the issue? If not combined what about extracting an API package for making the calls and both depending on that?

nstrelow commented 3 years ago

Ohhh, I wouldn't say it is 100% solved the sleep issue.

I have not tested it for a while, but the logic of the sleep testing is very bad. Trust me, I wrote that code 😝 .

Ideally I would take the time, a lot of time, and rework the whole thing into a python package. This package should be able to do ALL available commands. Then have a home assistant component, which includes the pairing process. And the dream thing would be: Add the TV as a device, which has multiple additional components including the ambilights as light and other things as media_player and services.

jomwells commented 3 years ago

Interesting, to be honest I had been thinking the same myself. I would love to add autodiscover, pairing and config all in the frontend. There are also an increasing number of bug fixes and features from my other repos that could be merged onto one component. If you are interested @nstrelow let me know if and when you plan on rewriting, and I would be happy to help out merge our two components into a superior media_player, and maybe share some of that work load ;)

nstrelow commented 3 years ago

Sadly currently away from my place where the TV is and time is also short. Just FYI. Sorry