Creating new files for our nightstand lights
This commit is contained in:
91
nightstandljm.yaml
Normal file
91
nightstandljm.yaml
Normal file
@@ -0,0 +1,91 @@
|
||||
substitutions:
|
||||
device_name: nightstandljm
|
||||
#device_ip: 192.168.87.45
|
||||
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "RxgR/v9F6OQQmn37bnfqvgWlb2Img/TXKPFrHV88Cu8="
|
||||
# key: "EgFzta0ZRgjSLEAfkzFDFlzs2ZDcs+2sD5LL7vSHSmE="
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
|
||||
wifi:
|
||||
ssid: "Meneely"
|
||||
password: "punxsutawney1"
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Nightstand LJM Fallback Hotspot"
|
||||
password: "punxsutawney1"
|
||||
|
||||
captive_portal:
|
||||
|
||||
|
||||
#######################################
|
||||
# Device specific Config Begins Below #
|
||||
#######################################
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO00 # The built-in switch
|
||||
id: reset
|
||||
internal: true
|
||||
filters:
|
||||
- invert:
|
||||
- delayed_off: 10ms
|
||||
on_press:
|
||||
- switch.toggle:
|
||||
id: relay_1
|
||||
|
||||
- platform: gpio
|
||||
name: ${device_name}_status
|
||||
pin: GPIO04 # The external terminals
|
||||
id: switch_1
|
||||
filters:
|
||||
- delayed_on: 100ms
|
||||
on_press:
|
||||
then:
|
||||
- switch.toggle:
|
||||
id: relay_1
|
||||
# on_release:
|
||||
# then:
|
||||
# - switch.toggle:
|
||||
# id: relay_1
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: ${device_name}_switch
|
||||
icon: "mdi:lightbulb_outline"
|
||||
pin: GPIO12
|
||||
id: relay_1
|
||||
restore_mode: restore_default_off
|
||||
|
||||
#status_led:
|
||||
# pin:
|
||||
# number: GPIO13
|
||||
# inverted: true
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: blue_led
|
||||
pin: GPIO13
|
||||
inverted: True
|
||||
|
||||
light:
|
||||
# the 4 lines below define the Blue LED light on Sonoff Mini, to expose in HomeAssistant remove line "internal: true"
|
||||
- platform: monochromatic
|
||||
name: ${device_name}_blueled
|
||||
output: blue_led
|
||||
internal: true # hides the Blue LED from HomeAssistant
|
||||
Reference in New Issue
Block a user