Skippy
(Martin Buist)
May 18, 2017, 12:37pm
1
My sensor is an xbox live sensor
states online or offline. But there are some attribuut in it like
sensor.sk1ppy_nl Online
friendly_name: Sk1ppy nl
XboxOne Background: Home
entity_picture: http://images-eds.xboxlive.com/image?url=
XboxOne Full: Forza Hub
icon: mdi:xbox
Now what I want if XboxOne Full is sayig netflix it should activate scene.movie
So the trigger should be when XboxOne Full changes to Netflix thn activate scene.movie
treno
(travis reno)
May 18, 2017, 3:55pm
2
If I understand you correctly, you are trying to pull a value from an attribute and base a trigger on that attribute.
You can do this in one step, but I prefer to handle it in two steps.
First, I define a template sensor that pulls out the attribute value: automation: - platform: template
sensors:
lake_house_away:
value_template: ‘{{ states.climate.lake_house.attributes.away_mode }}’
friendly_name: ‘Lake House Away Mode’
Then I base a trigger on that sensor - alias: Lake House Away Change
trigger:
platform: state
entity_id: sensor.lake_house_away
state: 'off'
action:
- service: notify.pushnotifications
data:
message: Lake House Thermostat is not in away_mode
Skippy
(Martin Buist)
May 18, 2017, 6:39pm
3
Thank you. You just gave me the push in the right direction
This is working for me now
- alias: Media - Netflix op xbox
trigger:
platform: template
value_template: "{{ is_state_attr('sensor.sk1ppy_nl', 'XboxOne Full', 'Netflix') }}"
action:
service: scene.turn_on
entity_id: scene.movie
- alias: Game - Destiny
trigger:
platform: template
value_template: "{{ is_state_attr('sensor.sk1ppy_nl', 'XboxOne Full', 'Destiny') }}"
action:
service: scene.turn_on
entity_id: scene.game
5 Likes