Home Assistant Community

Philips Android TV Ambilights (Light) component


Sorry to hear it’s not working for you, (and that I havent seen this for so long!) perhaps the API calls are different for other models? It seems to be failing on the api request for the ambilights current configuration, which works no problem for me (43PUS7303/12), I can have a look for you after the end of the month when my schedule clears up abit :slight_smile:


Is it the ambilight+hue on/off that you would like to automate? I have noticed the lights remaining on after I turn the tv off manually (if I have turned the ambilights on with this component), but a solution may be to use the tv (meda_player) component to detect the tv turning off, and automate the ambilights turning off whenever it does so


Awesome! If you need help adding ambilight+hue switch and testing it, I’ll be glad to help, just PM me when you get to it! Good luck with the exams, man!

1 Like

Yes, that is my idea but to implement it we need to have implemented ambilight+hue on/off/status component or switch. So far, I can turn on and off it using a customer switch component, however, I cannot find a solution to see the status. Also, I think it would be reasonable to have this feature as part of ambilight component rather than a separate one.


To check the status of ambilight + hue @jomwells has to send a post request to https://ip-address:1926/6/menuitems/settings/current with a body:

The response will be like this:
{"values":[{"value":{"Nodeid":2131230774,"Controllable":true,"Available":true,"string_id":"Switch on","data":{"value":false}}}],"version":0}

Where “value:false” means it’s off and “value:true” means its on.

I still need to implement clean responses in my python tool (so it can be used as a command line sensor in HA), but that will probably take some time since first I need to finish testing and documenting all endpoints in the API and I haven’t been able to use my TV for testing for the past couple of weeks…


Thank you, I’ve tried to use command line sensor for controlling status and using the response you provided, however, I did’t succeed for some reason. I really hope you’ll be implemented it soon.


That would be really nice, would be so cool to use the ambilights.


@gyrga @Molodax, Right, I’m back, having looked at that python tool (fantastic by the way) it should be quite straight forward (in terms of the code) to add these ambilight+hue features into home assistant, but how do you think this should be done? Currently, for the extra features (the effects) i’m using the built in effects drop down for the individual light, but I don’t see an option for adding a secondary switch within the ambilight (light) panel itself, I wonder if it would be better to try and create a seporate remote component, combining many of the features in the python script (power on/off, navigation, launching apps etc) and having the +hue switch as a part of that, keeping the RBG light control as a separate entity? what are your thoughts
The only other option would be to add an Ambilight+Hue OFF and Ambilight+Hue ON ‘effect’ within the drop down, which would allow automation, but is essentially a work around


I think just adding them as a service will be a big thing. One can create shortcuts if they want to expose the functionality in the UI.


For anyone interested in automating the Ambilight+Hue setting, I have put together a Switch component using most of the code from the Ambilight Light component, this quickly adds support for Ambilight+Hue status (while the tv is available) and switching on/off from Home Assistant, note, there is a bit of a lag between HA sending the on/off request, and registering it change, therefore it is advised to decrease the scan_interval in your configuration.yaml, enjoy :slight_smile:


Hi did you have time to look further into this. I’d still like to have this too.


Are you guys able to turn on the Ambilight on even if the TV wasn’t on for a while. My ambilight goes unavailable about 5min after I turn the Tv to standby (WoWLAN enabled).

I saw this:

Known Issues

  • The light component can turn the Ambilights on when the TV is off, however, after the TV has been in standby for a long period of time, the component will loose connection, and will be unable to turn the lights on again until the TV is woken up and reconnects - this can be solved by manually turning on the TV and then changing the ambilights, or through the use of an IR blaster connected to Home Assistant to achieve the same result.

But it says for a long period of time, mine goes offline a few minutes after. Not quite a long period of time.

Or should this feature only be used when the TV is on. I thought I could use the light without the TV on with this component, but I can only use it like this for liek 5min (see above).

Philips Android TV component

I still have the unavailabilty question from above but I ran into another issue.

With the example from above my automation looks like this

- alias: Ambilight - TV follows Light
  initial_state: 'on'
    - entity_id: light.sphere
      platform: state
    - condition: template
      value_template: "{{ not is_state('light.ambilight', 'unavailable') }}"
    - service: light.turn_on
      entity_id: light.ambilight
        brightness: '{{ states.light.sphere.attributes.brightness|int }}'
        xy_color: ['{{states. light.sphere.attributes.xy_color[0]|float}}','{{states. light.sphere.attributes.xy_color[1]|float}}']

While xy_color works, the brightness value does not get set.

If I set it in the service tab in home assisant like this

  "entity_id": "light.ambilight",
"brightness": "75"

it works, but it does not follow this line

brightness: '{{ states.light.sphere.attributes.brightness|int }}'


mine was working well but all of a sudden it is now unavailable all the time, tv on or off? any idea please?

1 Like

That is a known issue with this component, I think it was mentioned above somewhere in this thread, it is due to the way the jointspace API handles brightness commands - as of yet, the brightness will only be set if it is set to FOLLOW_COLOR, and you cannot set both brightness and colour in the same POST request - im sure this could be improved upon, but it would require rewriting the component (If anyone else has the time to do this, I would be happy to change it on the github repo :smiley: )

1 Like

To anyone having problems with availiability - this wont completely solve your problem (TV can still enter deep sleep at times) but try enabbling the wake on LAN setting in the TV’s settings app, that is the only difference I can think of, the ambilight component works for a long period of time after the TV switches off for me currently


Great work! I’m just curious about something… Any chance this component lets us use Xiaomi Yeelight/led stripes?

Something like this:

I have a full Xiaomi lights setup and don’t want to buy a new Philips Hue setup.


1 Like

Hey everyone!
I have created (my first!) a pull request on github to update this component to make it compatible with Home Assistant after the ‘Great Migration’. In the meantime, while the PR isn’t through yet (or if the author has objections to some other changes, which is fair) you can find the working version on my repo (you should see it in “forks”)

I also changed it up a bit to make it reflect the philips naming convention a bit more, so you need to pay attention to that and update your config accordingly!


@jomwells seems like we will get issues with 0.92


and (different component that was fixed fast)


@h4nc already created a PR on github to fix this, in the meantime you could use the component from my fork until it’s merged (but remember to change the platform name in your config). Although I haven’t added the init.py, the component works perfectly fine for me on 0.92. I changed the folder structure and added the needed manifest that defines the domain.

Like I said, if you don’t want to wait for the merge you can look at the current PRs on github, there you should find my PR. :slight_smile: