Last active
February 22, 2021 17:58
-
-
Save alexiri/1043c9c8b8e6b6ddc776d8c2f23de6a8 to your computer and use it in GitHub Desktop.
Entangled Lights: https://www.thingiverse.com/thing:4716398
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
devicename: notify_1 | |
upper_devicename: "Notify 1" | |
blink_duration: 10s | |
twin: "notify_2" | |
esphome: | |
name: $devicename | |
platform: ESP8266 | |
board: nodemcuv2 | |
packages: | |
wifi: !include common/wifi.yaml | |
device_base: !include common/basics.yaml | |
status_led: | |
pin: | |
number: D0 | |
inverted: True | |
switch: | |
## restart | |
- platform: restart | |
name: "$upper_devicename Restart" | |
- platform: template | |
name: "${devicename}_red" | |
turn_on_action: | |
- light.turn_off: light_1 | |
- light.turn_on: | |
id: light_1 | |
brightness: 50% | |
red: 100% | |
green: 0% | |
blue: 0% | |
effect: "Breath" | |
- delay: $blink_duration | |
- light.turn_off: light_1 | |
- platform: template | |
name: "${devicename}_green" | |
turn_on_action: | |
- light.turn_off: light_1 | |
- light.turn_on: | |
id: light_1 | |
brightness: 50% | |
red: 0% | |
green: 100% | |
blue: 0% | |
effect: "Breath" | |
- delay: $blink_duration | |
- light.turn_off: light_1 | |
- platform: template | |
name: "${devicename}_blue" | |
turn_on_action: | |
- light.turn_off: light_1 | |
- light.turn_on: | |
id: light_1 | |
brightness: 50% | |
red: 0% | |
green: 0% | |
blue: 100% | |
effect: "Breath" | |
- delay: $blink_duration | |
- light.turn_off: light_1 | |
binary_sensor: | |
- platform: status | |
name: "$upper_devicename System Status" | |
- platform: gpio | |
id: buttonRed | |
pin: | |
number: D5 | |
filters: | |
- delayed_on: 100ms | |
on_press: | |
- light.turn_off: light_1 | |
- light.turn_on: | |
id: light_1 | |
brightness: 50% | |
red: 100% | |
green: 0% | |
blue: 0% | |
- homeassistant.service: | |
service: switch.turn_on | |
data: | |
entity_id: "switch.${twin}_red" | |
- delay: 1s | |
- light.turn_off: light_1 | |
- platform: gpio | |
id: buttonGreen | |
pin: | |
number: D6 | |
filters: | |
- delayed_on: 100ms | |
on_press: | |
- light.turn_off: light_1 | |
- light.turn_on: | |
id: light_1 | |
brightness: 50% | |
red: 0% | |
green: 100% | |
blue: 0% | |
- homeassistant.service: | |
service: switch.turn_on | |
data: | |
entity_id: "switch.${twin}_green" | |
- delay: 1s | |
- light.turn_off: light_1 | |
- platform: gpio | |
id: buttonBlue | |
pin: | |
number: D7 | |
filters: | |
- delayed_on: 100ms | |
on_press: | |
- light.turn_off: light_1 | |
- light.turn_on: | |
id: light_1 | |
brightness: 50% | |
red: 0% | |
green: 0% | |
blue: 100% | |
- homeassistant.service: | |
service: switch.turn_on | |
data: | |
entity_id: "switch.${twin}_blue" | |
- delay: 1s | |
- light.turn_off: light_1 | |
sensor: | |
- platform: uptime | |
name: "$upper_devicename Uptime" | |
- platform: wifi_signal | |
name: "$upper_devicename WiFi Signal" | |
update_interval: 15s | |
light: | |
- platform: fastled_spi | |
chipset: WS2801 | |
data_pin: D2 | |
clock_pin: D3 | |
num_leds: 4 | |
rgb_order: RBG | |
name: "$upper_devicename Light" | |
id: light_1 | |
effects: | |
- automation: | |
name: Breath | |
sequence: | |
- delay: 1s | |
- light.dim_relative: | |
id: light_1 | |
relative_brightness: 50% | |
transition_length: 4s | |
- delay: 1s | |
- light.dim_relative: | |
id: light_1 | |
relative_brightness: -50% | |
transition_length: 4s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment