Philips Android TV component

Yes exactly. Not ideal and I will proabay remove philips_2016.py, the next time I make changes to it.

1 Like

Heads-up, as of 0.92.0b0 this custom component isn’t working.

1 Like

Thanks for the heads up. Did you use the new custom component structure folder (folder named philips_2016)?

I currently had to move and I currently have no homeassistant installed anywhere. So if anyone is facing the problem and knows how to circumvent it, I would be very happy for a PR on GitHub or a hint on what to fix and somebody willing to test.

Thanks for the support guys ^^

I have a fix and will create a PR against your repo once I figure out how to do that.

1 Like

OK, there is now a PR on your GitHub repo that reflects the necessary changes to get the component working in 0.92 and forward.

-Jan

2 Likes

MERGED. Thanks to @olbjan this integration now works with 0.92.

Find the updated files and repo here: https://github.com/nstrelow/ha_philips_2016

Beware that the folder structure changes and more files are needed now. Check the Readme for the intructions.

Next: Show only your favorite channels in the channel selection menu. Feature request AND implementation of also @olbjan.

What’s your opinions? Would it help to only show the favorite channels in the selection menu?

Hi,

seems not to work.

–>
File “/config/custom_components/philips_android_tv/media_player.py”, line 45, in
DEFAULT_FAV = false
NameError: name ‘false’ is not defined
<–

I’ve tryed setting false in ’ '. With that HA starts again, but the dashboard show unly “unknown status”.

Regards,
dissi

1 Like

There’s a small bug, you need to set:
DEFAULT_FAV = False (capital F)
in that line 45.

Thanks for that update nstrelow!

1 Like

capital F solves the error on startup, thats true. But it shows even status Unkown for the tv there are a lot of errors in like:

–>
2019-04-27 19:29:34 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.philips_tv fails
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity.py”, line 220, in async_update_ha_state
await self.async_device_update()
File “/usr/src/app/homeassistant/helpers/entity.py”, line 377, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/util/init.py”, line 224, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/philips_android_tv/media_player.py”, line 239, in update
self._tv.update()
File “/config/custom_components/philips_android_tv/media_player.py”, line 320, in update
if favorite_only:
NameError: name ‘favorite_only’ is not defined
<–

1 Like

@Dissi You’re right. I’ve only checked volume change which seems to work ok. Can’t change source - select field has no values.

1 Like

Errors happend
I currently have no access to a Philips TV and therefore I am not testing changes I make, which resulted into todays errors. Sorry for that.

Newest version is up, and I did test it running on homeassistant, just without connecting to a TV. I hope this fixes it.

Please let me know if not.

1 Like

@nstrelow Just finished testing. It’s completely fine now. Thank you!!

1 Like

Concur, not changing anything keeps old behaviour and adding the new channel filter works as well.

And there is now support for the custom_updater component as well :slight_smile:

2 Likes

Would be nice to have this in custom updater.

1 Like

Favorite channels only and custom_updater support

With the new update you have to change your config from platform: philips_2016 to platform: philips_android_tv, as numbers are not supported anymore.

@olbjan has been pushing some awesome new stuff.

  1. There now is an option to only display the channels in your favorites list in the source selection. Add favorite_channels_only: true to your config.
  2. Now supports custom_updater, a component to manage your custom components. Use together with tracker-card to get the card from the screenshot below.
    Add https://raw.githubusercontent.com/nstrelow/ha_philips_2016/master/custom_components.json to component_urls .

As always head to my GitHub to get the latest version. And if you setup custom_updater, this will hopefully be the last time you manually have to copy the component :raised_hands:

Screenshot of tracker-card with philips_android_tv:
image

8 Likes

Hi,
I have a philips 803 oled 4K android tv with latest firmware.
I installed this component
succesful pair it

i’m watching netflix and can increase or decrease the sound
but what is strange, is that component show a play icon, instead of a pause icon and that it says that the TV is sleeping what of course is not the case. Any idea what i can do to fix this?

Detecting the playing state is not possible with the API. We can only Play or Pause, but not know which state the video is in.

Is it possible to filter the dropdown (source) menu?

You can create a favorite lists for your TV channels and then put “favorite_channels_only: true” in your config. Then only your favorite channels are displayed.

No way to do this for apps currently.
Make a feature request to the home assistant media player for this. Since this is a standart component.

I already use this

Would be nice to have this for the apps too.

To be honest I don’t know how and where to open a pull request. When I click open pr it tells me to compare versions.
Could you open that PR?