Edit esp-officedeskrightgpo.yaml
This commit is contained in:
@@ -44,7 +44,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)
|
||||||
@@ -58,7 +57,7 @@ substitutions:
|
|||||||
|
|
||||||
# Project Naming
|
# Project Naming
|
||||||
project_name: "Sonoff Technologies.Sonoff Basic V1" # Project Details
|
project_name: "Sonoff Technologies.Sonoff Basic V1" # Project Details
|
||||||
project_version: "v1.1" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
|
project_version: "v1.1" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
|
||||||
|
|
||||||
# Passwords & Secrets
|
# Passwords & Secrets
|
||||||
api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names
|
api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names
|
||||||
@@ -83,7 +82,6 @@ substitutions:
|
|||||||
mqtt_device_name: "office-deskright-gpo"
|
mqtt_device_name: "office-deskright-gpo"
|
||||||
mqtt_main_topic: "${mqtt_command_main_topic}/${mqtt_device_name}" # Topic we will use to command stuff from external without HA
|
mqtt_main_topic: "${mqtt_command_main_topic}/${mqtt_device_name}" # Topic we will use to command stuff from external without HA
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# PACKAGES: Included Common Packages
|
# PACKAGES: Included Common Packages
|
||||||
# https://esphome.io/components/packages.html
|
# https://esphome.io/components/packages.html
|
||||||
@@ -123,7 +121,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
|
||||||
@@ -137,13 +134,12 @@ esphome:
|
|||||||
name: "${project_name}"
|
name: "${project_name}"
|
||||||
version: "${project_version}"
|
version: "${project_version}"
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# ESP PLATFORM AND FRAMEWORK:
|
# ESP PLATFORM AND FRAMEWORK:
|
||||||
# https://esphome.io/components/esp8266.html
|
# https://esphome.io/components/esp8266.html
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
esp8266:
|
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:
|
||||||
@@ -152,7 +148,6 @@ preferences:
|
|||||||
mdns:
|
mdns:
|
||||||
disabled: false
|
disabled: false
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# LOGGING:
|
# LOGGING:
|
||||||
# https://esphome.io/components/logger.html
|
# https://esphome.io/components/logger.html
|
||||||
@@ -161,7 +156,6 @@ logger:
|
|||||||
level: "${log_level}"
|
level: "${log_level}"
|
||||||
baud_rate: 0 # set to 0 for no logging via UART
|
baud_rate: 0 # set to 0 for no logging via UART
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# STATUS LED:
|
# STATUS LED:
|
||||||
# https://esphome.io/components/status_led.html
|
# https://esphome.io/components/status_led.html
|
||||||
@@ -172,7 +166,6 @@ status_led:
|
|||||||
number: GPIO13
|
number: GPIO13
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# SWITCH COMPONENT:
|
# SWITCH COMPONENT:
|
||||||
# https://esphome.io/components/switch/
|
# https://esphome.io/components/switch/
|
||||||
@@ -186,7 +179,6 @@ switch:
|
|||||||
restore_mode: RESTORE_DEFAULT_ON
|
restore_mode: RESTORE_DEFAULT_ON
|
||||||
icon: "${relay_icon}"
|
icon: "${relay_icon}"
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# BINARY SENSORS:
|
# BINARY SENSORS:
|
||||||
# https://esphome.io/components/binary_sensor/
|
# https://esphome.io/components/binary_sensor/
|
||||||
@@ -222,12 +214,11 @@ binary_sensor:
|
|||||||
on_press:
|
on_press:
|
||||||
- mqtt.publish:
|
- mqtt.publish:
|
||||||
topic: "${mqtt_main_topic}/relay1/state"
|
topic: "${mqtt_main_topic}/relay1/state"
|
||||||
payload: "ON"
|
payload: "On"
|
||||||
on_release:
|
on_release:
|
||||||
- mqtt.publish:
|
- mqtt.publish:
|
||||||
topic: "${mqtt_main_topic}/relay1/state"
|
topic: "${mqtt_main_topic}/relay1/state"
|
||||||
payload: "OFF"
|
payload: "Off"
|
||||||
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# MQTT:
|
# MQTT:
|
||||||
@@ -237,11 +228,11 @@ mqtt:
|
|||||||
on_message:
|
on_message:
|
||||||
# Relay 1 control
|
# Relay 1 control
|
||||||
- topic: "${mqtt_main_topic}/relay1/set"
|
- topic: "${mqtt_main_topic}/relay1/set"
|
||||||
payload: "ON"
|
payload: "On"
|
||||||
then:
|
then:
|
||||||
- switch.turn_on: relay1
|
- switch.turn_on: relay1
|
||||||
|
|
||||||
- topic: "${mqtt_main_topic}/relay1/set"
|
- topic: "${mqtt_main_topic}/relay1/set"
|
||||||
payload: "OFF"
|
payload: "Off"
|
||||||
then:
|
then:
|
||||||
- switch.turn_off: relay1
|
- switch.turn_off: relay1
|
||||||
|
|||||||
Reference in New Issue
Block a user