Edit esp-garageextcornerlight.yaml
This commit is contained in:
@@ -39,7 +39,6 @@
|
|||||||
# - Accurate time is not needed (SNTP not required)
|
# - Accurate time is not needed (SNTP not required)
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# SUBSTITUTIONS: Specific device variable substitutions
|
# SUBSTITUTIONS: Specific device variable substitutions
|
||||||
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
|
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
|
||||||
@@ -80,7 +79,6 @@ substitutions:
|
|||||||
mqtt_command_topic: "${mqtt_command_main_topic}/${mqtt_device_name}"
|
mqtt_command_topic: "${mqtt_command_main_topic}/${mqtt_device_name}"
|
||||||
mqtt_status_topic: "${mqtt_status_main_topic}/${mqtt_device_name}"
|
mqtt_status_topic: "${mqtt_status_main_topic}/${mqtt_device_name}"
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# PACKAGES: Included Common Packages
|
# PACKAGES: Included Common Packages
|
||||||
# https://esphome.io/components/packages.html
|
# https://esphome.io/components/packages.html
|
||||||
@@ -120,7 +118,6 @@ packages:
|
|||||||
#diag_debug: !include common/include_debug_diag_sensors.yaml
|
#diag_debug: !include common/include_debug_diag_sensors.yaml
|
||||||
#diag_resetcount: !include common/include_resetcount_diag_sensors.yaml
|
#diag_resetcount: !include common/include_resetcount_diag_sensors.yaml
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# ESPHOME:
|
# ESPHOME:
|
||||||
# https://esphome.io/components/esphome.html
|
# https://esphome.io/components/esphome.html
|
||||||
@@ -131,7 +128,6 @@ esphome:
|
|||||||
comment: "${description_comment}" # Appears on the ESPHome page in HA
|
comment: "${description_comment}" # Appears on the ESPHome page in HA
|
||||||
area: "${device_area}"
|
area: "${device_area}"
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# ESP PLATFORM AND FRAMEWORK:
|
# ESP PLATFORM AND FRAMEWORK:
|
||||||
# https://esphome.io/components/esp8266.html
|
# https://esphome.io/components/esp8266.html
|
||||||
@@ -140,7 +136,6 @@ esp8266:
|
|||||||
board: esp01_1m # The original Sonoff Basic
|
board: esp01_1m # The original Sonoff Basic
|
||||||
restore_from_flash: true # restore some values on reboot
|
restore_from_flash: true # restore some values on reboot
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# PREFERENCES:
|
# PREFERENCES:
|
||||||
# https://esphome.io/components/preferences.html
|
# https://esphome.io/components/preferences.html
|
||||||
@@ -148,7 +143,6 @@ esp8266:
|
|||||||
preferences:
|
preferences:
|
||||||
flash_write_interval: 5min
|
flash_write_interval: 5min
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# MDNS:
|
# MDNS:
|
||||||
# https://esphome.io/components/mdns.html
|
# https://esphome.io/components/mdns.html
|
||||||
@@ -156,7 +150,6 @@ preferences:
|
|||||||
mdns:
|
mdns:
|
||||||
disabled: false
|
disabled: false
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# LOGGING:
|
# LOGGING:
|
||||||
# https://esphome.io/components/logger.html
|
# https://esphome.io/components/logger.html
|
||||||
@@ -165,7 +158,6 @@ logger:
|
|||||||
level: "${log_level}"
|
level: "${log_level}"
|
||||||
baud_rate: 0 # set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
baud_rate: 0 # set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# SWITCH COMPONENT:
|
# SWITCH COMPONENT:
|
||||||
# https://esphome.io/components/switch/
|
# https://esphome.io/components/switch/
|
||||||
@@ -179,7 +171,6 @@ switch:
|
|||||||
restore_mode: RESTORE_DEFAULT_OFF
|
restore_mode: RESTORE_DEFAULT_OFF
|
||||||
icon: "${relay_icon}"
|
icon: "${relay_icon}"
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# BINARY SENSORS:
|
# BINARY SENSORS:
|
||||||
# https://esphome.io/components/binary_sensor/
|
# https://esphome.io/components/binary_sensor/
|
||||||
@@ -217,12 +208,11 @@ binary_sensor:
|
|||||||
on_press:
|
on_press:
|
||||||
- mqtt.publish:
|
- mqtt.publish:
|
||||||
topic: "${mqtt_status_topic}"
|
topic: "${mqtt_status_topic}"
|
||||||
payload: "ON"
|
payload: "On"
|
||||||
on_release:
|
on_release:
|
||||||
- mqtt.publish:
|
- mqtt.publish:
|
||||||
topic: "${mqtt_status_topic}"
|
topic: "${mqtt_status_topic}"
|
||||||
payload: "OFF"
|
payload: "Off"
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# STATUS LED:
|
# STATUS LED:
|
||||||
@@ -234,7 +224,6 @@ status_led:
|
|||||||
number: GPIO13
|
number: GPIO13
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# MQTT: Device-specific command triggers
|
# MQTT: Device-specific command triggers
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
@@ -242,7 +231,7 @@ mqtt:
|
|||||||
on_message:
|
on_message:
|
||||||
# Relay control (only act and publish if a change is needed)
|
# Relay control (only act and publish if a change is needed)
|
||||||
- topic: "${mqtt_command_topic}"
|
- topic: "${mqtt_command_topic}"
|
||||||
payload: "ON"
|
payload: "On"
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
@@ -252,10 +241,10 @@ mqtt:
|
|||||||
- switch.turn_on: relay1
|
- switch.turn_on: relay1
|
||||||
- mqtt.publish:
|
- mqtt.publish:
|
||||||
topic: "${mqtt_status_topic}"
|
topic: "${mqtt_status_topic}"
|
||||||
payload: "ON"
|
payload: "On"
|
||||||
|
|
||||||
- topic: "${mqtt_command_topic}"
|
- topic: "${mqtt_command_topic}"
|
||||||
payload: "OFF"
|
payload: "Off"
|
||||||
then:
|
then:
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
@@ -265,7 +254,7 @@ mqtt:
|
|||||||
- switch.turn_off: relay1
|
- switch.turn_off: relay1
|
||||||
- mqtt.publish:
|
- mqtt.publish:
|
||||||
topic: "${mqtt_status_topic}"
|
topic: "${mqtt_status_topic}"
|
||||||
payload: "OFF"
|
payload: "Off"
|
||||||
|
|
||||||
# Announce current state whenever MQTT (re)connects
|
# Announce current state whenever MQTT (re)connects
|
||||||
on_connect:
|
on_connect:
|
||||||
|
|||||||
Reference in New Issue
Block a user