Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add night mode switch #97

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
27 changes: 26 additions & 1 deletion voice-assistant/m5stack-atom-echo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ script:
condition:
- switch.is_on: use_wake_word
- switch.is_on: use_listen_light
- switch.is_off: night_mode
then:
- light.turn_on:
id: led
Expand All @@ -195,7 +196,21 @@ script:
brightness: 60%
effect: none
else:
- light.turn_off: led
- if:
condition:
- switch.is_on: use_wake_word
- switch.is_on: use_listen_light
- switch.is_on: night_mode
then:
- light.turn_on:
id: led
blue: 100%
red: 100%
green: 0%
brightness: 20%
effect: none
else:
- light.turn_off: led

switch:
- platform: template
Expand Down Expand Up @@ -227,6 +242,16 @@ switch:
- script.execute: reset_led
on_turn_off:
- script.execute: reset_led
- platform: template
name: Night Mode
id: night_mode
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
entity_category: config
on_turn_on:
- script.execute: reset_led
on_turn_off:
- script.execute: reset_led

external_components:
- source: github://pr#5230
Expand Down