Hi, I've got the Sony Bravia 8 MK2 and have got it linked to the official Sony Bravia app, I would like to turn on my Blu-ray Player's power socket when I select hdmi 2 on the tv but I can't find a way for HA to know when its on that source, can anyone help?
On my Bravia, the integration created a media player entity (in my case called media_player.sony_bravia_tv).
When I look in developer tools, I see the following attributes for that media player:
source_list: HT-A8000, HDMI 1, HDMI 2, HDMI 3 (eARC/ARC), HDMI 4, Video
volume_level: 0.37
is_volume_muted: false
media_content_id: extInput:hdmi?port=3
media_title: HDMI 3 (eARC/ARC)
source: HDMI 3 (eARC/ARC)
assumed_state: true
device_class: tv
friendly_name: Sony XR-65X90L
supported_features: 155581
I think either source, media_title, or media_content_id will give you some version of that info, and you can use that attribute in an automation trigger.
how would I integrate that into my automation, tv is called Sony Bravia 8Mk2
You need to create a trigger in your automation.
description: ""
mode: single
triggers:
- trigger: state
entity_id:
- media_player.sony_bravia_tv
attribute: source
to:
- HDMI 2
conditions: []
actions: []
If you're doing it from the GUI, first make sure the TV is on. The add a trigger using the entity, and the drop down list for attributes will show all the attributes. Pick the source attribute. Then when you look at the drop down for the to field, it will show all the ports your TV has. Pick the right one. Then do whatever action you want.
hi, if I copy the .yaml for my turn plug on and off, would you either explain how to edit them to add the required info or would you edit .yaml for me
hi, I've just had a go at editing with the required info and it works for auto turning on and off the plug when changing to and from HDMI 2