Move basement LED strip resets to a counter #184
This commit is contained in:
@ -2274,59 +2274,36 @@
|
||||
- unavailable
|
||||
- unknown
|
||||
id: button
|
||||
- platform: time
|
||||
at: 00:00:00
|
||||
id: midnight
|
||||
condition: []
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ is_state(''input_boolean.studio_quiet'',''off'') and is_state(''sensor.twitch_ironnerd24'',''offline'')
|
||||
and states(''switch.basement_led_strip'') not in [''unknown'',''unavailable'']
|
||||
}}'
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id:
|
||||
- offline
|
||||
- button
|
||||
- repeat:
|
||||
while:
|
||||
- condition: state
|
||||
entity_id: light.basement_led_strip_1
|
||||
state: unavailable
|
||||
- condition: template
|
||||
value_template: '{{ repeat.index <= 10 }}'
|
||||
sequence:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ is_state(''input_boolean.studio_quiet'',''off'') and
|
||||
is_state(''sensor.twitch_ironnerd24'',''offline'') and states(''switch.basement_led_strip'')
|
||||
not in [''unknown'',''unavailable''] }}'
|
||||
then:
|
||||
- repeat:
|
||||
while:
|
||||
- condition: state
|
||||
entity_id: light.basement_led_strip_1
|
||||
state: unavailable
|
||||
- condition: template
|
||||
value_template: '{{ repeat.index <= 10 }}'
|
||||
sequence:
|
||||
- service: input_number.increment
|
||||
target:
|
||||
entity_id: input_number.basement_led_strip_resets
|
||||
data: {}
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.basement_led_strip
|
||||
data: {}
|
||||
- delay:
|
||||
seconds: 20
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.basement_led_strip
|
||||
data: {}
|
||||
- delay:
|
||||
seconds: 30
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: midnight
|
||||
sequence:
|
||||
- service: input_number.set_value
|
||||
- service: counter.increment
|
||||
target:
|
||||
entity_id: input_number.basement_led_strip_resets
|
||||
data:
|
||||
value: 0
|
||||
entity_id: counter.basement_led_strip_resets
|
||||
data: {}
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.basement_led_strip
|
||||
data: {}
|
||||
- delay:
|
||||
seconds: 20
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.basement_led_strip
|
||||
data: {}
|
||||
- delay:
|
||||
seconds: 30
|
||||
mode: single
|
||||
- id: '1696286732266'
|
||||
alias: Living Room Lights Adaptive Resync
|
||||
@ -2770,6 +2747,7 @@
|
||||
- counter.back_door_opened_today
|
||||
- counter.front_door_opened_today
|
||||
- counter.basement_studio_door_opened_today
|
||||
- counter.basement_led_strip_resets
|
||||
data: {}
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
|
@ -98,13 +98,6 @@ input_number:
|
||||
step: 1
|
||||
unit_of_measurement: minutes
|
||||
icon: mdi:timer
|
||||
basement_led_strip_resets:
|
||||
name: Basement LED Strip Resets
|
||||
min: 0
|
||||
max: 500
|
||||
step: 1
|
||||
unit_of_measurement: resets
|
||||
icon: mdi:restore
|
||||
downstairs_bathroom_lux_threshold:
|
||||
name: Downstairs Bathroom Lux Threshold
|
||||
min: 0
|
||||
@ -687,11 +680,6 @@ template:
|
||||
availability: "{{ is_state('light.master_bedroom_lights','on') and is_state('switch.adaptive_lighting_master_bedroom','on') }}"
|
||||
unit_of_measurement: '%'
|
||||
icon: mdi:brightness-percent
|
||||
- name: "Basement LED Strip Resets"
|
||||
unique_id: 0d016f09-a89b-4616-83b7-934580612d00
|
||||
state: "{{ states('input_number.basement_led_strip_resets') | int }}"
|
||||
unit_of_measurement: 'resets'
|
||||
icon: mdi:restore
|
||||
- name: Tina Desk Scene
|
||||
unique_id: 0d94ba35-bc9d-40a2-aa77-776d26bc3538
|
||||
state: >
|
||||
|
Reference in New Issue
Block a user