Move basement LED strip resets to a counter #184

This commit is contained in:
2023-12-18 22:36:12 -05:00
parent 4b23b5d093
commit 2c598b254f
2 changed files with 28 additions and 62 deletions

View File

@ -2274,26 +2274,12 @@
- unavailable
- unknown
id: button
- platform: time
at: 00:00:00
id: midnight
condition: []
action:
- choose:
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- offline
- button
sequence:
- if:
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''] }}'
then:
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:
- repeat:
while:
- condition: state
@ -2302,9 +2288,9 @@
- condition: template
value_template: '{{ repeat.index <= 10 }}'
sequence:
- service: input_number.increment
- service: counter.increment
target:
entity_id: input_number.basement_led_strip_resets
entity_id: counter.basement_led_strip_resets
data: {}
- service: switch.turn_off
target:
@ -2318,15 +2304,6 @@
data: {}
- delay:
seconds: 30
- conditions:
- condition: trigger
id: midnight
sequence:
- service: input_number.set_value
target:
entity_id: input_number.basement_led_strip_resets
data:
value: 0
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

View File

@ -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: >