Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions home-assistant-voice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ switch:
entity_category: config
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
# Timer LED remaining time off switch
- platform: template
id: lock_buttons
name: Lock buttons
icon: "mdi:button-pointer"
entity_category: config
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF
disabled_by_default: true
# Internal switch to track when a timer is ringing on the device.
- platform: template
id: timer_ringing
Expand Down Expand Up @@ -262,9 +271,17 @@ binary_sensor:
number: GPIO0
inverted: true
on_press:
- script.execute: control_leds
- if:
condition:
switch.is_off: lock_buttons
then:
- script.execute: control_leds
on_release:
- script.execute: control_leds
- if:
condition:
switch.is_off: lock_buttons
then:
- script.execute: control_leds
# If a factory reset is requested, factory reset on release
- if:
condition:
Expand All @@ -285,7 +302,7 @@ binary_sensor:
then:
- if:
condition:
lambda: return !id(init_in_progress) && !id(color_changed);
lambda: return !id(init_in_progress) && !id(color_changed) && !id(lock_buttons).state;
then:
- if:
condition:
Expand Down Expand Up @@ -335,7 +352,7 @@ binary_sensor:
then:
- if:
condition:
lambda: return !id(init_in_progress) && !id(color_changed);
lambda: return !id(init_in_progress) && !id(color_changed) && !id(lock_buttons).state;
then:
- script.execute:
id: play_sound
Expand All @@ -356,7 +373,7 @@ binary_sensor:
then:
- if:
condition:
lambda: return !id(init_in_progress) && !id(color_changed);
lambda: return !id(init_in_progress) && !id(color_changed) && !id(lock_buttons).state;
then:
- script.execute:
id: play_sound
Expand All @@ -372,7 +389,7 @@ binary_sensor:
then:
- if:
condition:
lambda: return !id(init_in_progress) && !id(color_changed);
lambda: return !id(init_in_progress) && !id(color_changed) && !id(lock_buttons).state;
then:
- script.execute:
id: play_sound
Expand Down Expand Up @@ -951,7 +968,9 @@ sensor:
- lambda: id(dial_touched) = true;
- if:
condition:
binary_sensor.is_off: center_button
and:
- binary_sensor.is_off: center_button
- switch.is_off: lock_buttons
then:
- script.execute:
id: control_volume
Expand All @@ -964,7 +983,9 @@ sensor:
- lambda: id(dial_touched) = true;
- if:
condition:
binary_sensor.is_off: center_button
and:
- binary_sensor.is_off: center_button
- switch.is_off: lock_buttons
then:
- script.execute:
id: control_volume
Expand Down