Skip to content

Commit

Permalink
added a report entity field, in order to allow the current scene to b…
Browse files Browse the repository at this point in the history
…e displayed somehow
  • Loading branch information
nilsreiter committed May 18, 2024
1 parent 2784b45 commit 7bef009
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ha-scenes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ blueprint:
step: 0.1
unit_of_measurement: "s"
default: 0.5
report_entity:
default:
name: Reporter entity
description: >-
For proper visualisation, it might be good to know which scene was last
activated. If this entity is set, it will always be updated when the
script is called.
selector:
entity:
domain: input_text
transition:
name: Transition time
description: How long to move from one color to the next
Expand Down Expand Up @@ -275,6 +285,7 @@ fields:
unit_of_measurement: "%"

variables:
report_entity: !input report_entity
target: !input target
sat_min: !input sat_min
sat_max: !input sat_max
Expand Down Expand Up @@ -442,6 +453,14 @@ sequence:
- conditions: "{{ lights | count == 0 }}"
sequence:
- stop: "No lights available"
- choose:
- conditions: "{{ report_entity is defined }}"
sequence:
- service: input_text.set_value
data:
value: "{{ scene }}"
target:
entity_id: !input report_entity
- repeat:
while: >-
{{ repeat.index == 1 or (
Expand Down

0 comments on commit 7bef009

Please sign in to comment.