Steele88
(Mike)
1
Hello, I’m trying to adjust an LED light based on a value in a sensor I have.
description: ""
trigger:
- platform: state
entity_id:
- sensor.raptors
attribute: team_score
condition: []
action:
- device_id: 0648d9c22851f116184c880591fbfe44
domain: number
entity_id: number.breakfast_bar_intensity
type: set_value
value:
mode: single
What I’m looking to accomplish is have the value in the action be equal to the attribute team_score in the above sensor. Any ideas?
You can access data from the trigger using Automation trigger variables
description: ""
trigger:
- platform: state
entity_id:
- sensor.raptors
attribute: team_score
condition: []
action:
- service: number.set_value
target:
entity_id: number.breakfast_bar_intensity
data:
value: "{{ trigger.to_state.attributes.team_score | float(0) }}"
mode: single
Steele88
(Mike)
4
That didn’t work unfortunately. Any ideas?
What do you mean by “That didn’t work”… what is your testing method?