Skip to content

Commit

Permalink
Inverse the Mute Switch Behavior (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpouffier authored Dec 13, 2023
1 parent 64ae354 commit d320371
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions voice-assistant/esp32-s3-box-3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ voice_assistant:
- delay: 1s
- if:
condition:
switch.is_on: mute
switch.is_off: mute
then:
- lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
else:
Expand All @@ -192,7 +192,7 @@ voice_assistant:
on_client_connected:
- if:
condition:
switch.is_on: mute
switch.is_off: mute
then:
- wait_until:
not: ble.enabled
Expand Down Expand Up @@ -266,9 +266,9 @@ switch:
name: Mute
id: mute
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
restore_mode: RESTORE_DEFAULT_OFF
entity_category: config
on_turn_on:
on_turn_off:
- if:
condition:
lambda: return !id(init_in_progress);
Expand All @@ -282,7 +282,7 @@ switch:
then:
- voice_assistant.start_continuous
- script.execute: draw_display
on_turn_off:
on_turn_on:
- if:
condition:
lambda: return !id(init_in_progress);
Expand Down
10 changes: 5 additions & 5 deletions voice-assistant/esp32-s3-box-lite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ voice_assistant:
- delay: 1s
- if:
condition:
switch.is_on: mute
switch.is_off: mute
then:
- lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
else:
Expand All @@ -240,7 +240,7 @@ voice_assistant:
on_client_connected:
- if:
condition:
switch.is_on: mute
switch.is_off: mute
then:
- wait_until:
not: ble.enabled
Expand Down Expand Up @@ -315,9 +315,9 @@ switch:
name: Mute
id: mute
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
restore_mode: RESTORE_DEFAULT_OFF
entity_category: config
on_turn_on:
on_turn_off:
- if:
condition:
lambda: return !id(init_in_progress);
Expand All @@ -331,7 +331,7 @@ switch:
then:
- voice_assistant.start_continuous
- script.execute: draw_display
on_turn_off:
on_turn_on:
- if:
condition:
lambda: return !id(init_in_progress);
Expand Down
10 changes: 5 additions & 5 deletions voice-assistant/esp32-s3-box.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ voice_assistant:
- delay: 1s
- if:
condition:
switch.is_on: mute
switch.is_off: mute
then:
- lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
else:
Expand All @@ -185,7 +185,7 @@ voice_assistant:
on_client_connected:
- if:
condition:
switch.is_on: mute
switch.is_off: mute
then:
- wait_until:
not: ble.enabled
Expand Down Expand Up @@ -259,9 +259,9 @@ switch:
name: Mute
id: mute
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
restore_mode: RESTORE_DEFAULT_OFF
entity_category: config
on_turn_on:
on_turn_off:
- if:
condition:
lambda: return !id(init_in_progress);
Expand All @@ -275,7 +275,7 @@ switch:
then:
- voice_assistant.start_continuous
- script.execute: draw_display
on_turn_off:
on_turn_on:
- if:
condition:
lambda: return !id(init_in_progress);
Expand Down

0 comments on commit d320371

Please sign in to comment.