Add nodes/d1-mini-on-air-3f5817

This commit is contained in:
clerie 2025-04-03 21:49:12 +02:00
parent 3708e463a3
commit 84c5bfd799
2 changed files with 90 additions and 0 deletions
nodes/d1-mini-on-air-3f5817

@ -0,0 +1,5 @@
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
/secrets.yaml

@ -0,0 +1,85 @@
---
substitutions:
macsuffix: "3f5817"
wifi:
power_save_mode: LIGHT
improv_serial:
script:
- id: set_light_on_air
then:
- light.turn_on:
id: indicator
red: 1
green: 0
blue: 0
effect: "None"
brightness: 70%
- id: set_light_online
then:
- light.turn_on:
id: indicator
red: 0.9
green: 0.9
blue: 0.9
effect: "None"
brightness: 40%
- id: set_light_disconnected
then:
- light.turn_on:
id: indicator
red: 0
green: 0
blue: 0
effect: "None"
brightness: 0%
esphome:
name: "d1-mini-on-air-${macsuffix}"
esp8266:
board: d1_mini
captive_portal:
logger:
level: DEBUG
logs:
light: INFO
web_server:
port: 80
api:
reboot_timeout: 0s
button:
- platform: template
name: "${macsuffix} Disconnected"
on_press:
- script.execute:
id: set_light_disconnected
- platform: template
name: "${macsuffix} Off-Air"
on_press:
- script.execute:
id: set_light_online
- platform: template
name: "${macsuffix} On-Air"
on_press:
- script.execute:
id: set_light_on_air
light:
- platform: neopixelbus
id: indicator
name: "${macsuffix} Light"
type: GRB
variant: WS2812
pin: GPIO0
num_leds: 17
initial_state:
state: off