esphome/esphome/components/status_indicator/_test/test.yaml

147 lines
2.9 KiB
YAML

---
esphome:
name: m5stack-atom-echo
esp32:
board: m5stack-atom
logger:
level: DEBUG
light:
- platform: esp32_rmt_led_strip
id: led
pin: GPIO27
default_transition_length: 0s
chipset: SK6812
num_leds: 1
rgb_order: grb
rmt_channel: 0
effects:
- pulse:
name: "Slow Pulse"
transition_length: 250ms
update_interval: 250ms
min_brightness: 50%
max_brightness: 100%
- pulse:
name: "Fast Pulse"
transition_length: 100ms
update_interval: 100ms
min_brightness: 50%
max_brightness: 100%
wifi:
ssid: LumenIOT24
password: Lum3nS0fT
binary_sensor:
- platform: gpio
pin:
number: GPIO39
inverted: true
name: Button
disabled_by_default: true
entity_category: diagnostic
id: button
on_press:
- status.push: custom_status2
- status.push: custom_status3
- status.push: custom_status1
on_release:
- status.pop:
group: "custom"
- delay: 5s
- status.pop: custom_status1
status_indicator:
on_turn_off: # Manditory
- light.turn_off:
id: led
on_app_error:
then:
- light.turn_on:
id: led
red: 100%
green: 0%
blue: 0%
brightness: 100%
effect: None
on_app_warning:
then:
- light.turn_on:
id: led
red: 100%
green: 0%
blue: 0%
brightness: 100%
effect: Slow Pulse
on_wifi_ap_enabled:
then:
- light.turn_on:
id: led
red: 100%
green: 100%
blue: 50%
brightness: 100%
effect: None
on_network_disconnected:
then:
- light.turn_on:
id: led
red: 100%
green: 0%
blue: 0%
brightness: 100%
effect: Fast Pulse
on_api_disconnected:
then:
- light.turn_on:
id: led
red: 100%
green: 100%
blue: 0%
brightness: 100%
effect: Fast Pulse
on_custom_status:
- trigger_id: custom_status1
priority: 1
then:
- light.turn_on:
id: led
red: 0%
green: 100%
blue: 0%
brightness: 100%
effect: None
- trigger_id: custom_status2
group: custom
priority: 3
then:
- light.turn_on:
id: led
red: 50%
green: 0%
blue: 100%
brightness: 100%
effect: None
- trigger_id: custom_status3
group: custom1
priority: 1
then:
- light.turn_on:
id: led
red: 100%
green: 100%
blue: 50%
brightness: 100%
effect: Fast pulse
- delay: 10s
- status.pop: custom_status3