Edit esp-officedeskrightgpo.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-25 21:56:00 +12:00
parent 1d02c6c758
commit dc941745d5
+6 -15
View File
@@ -44,7 +44,6 @@
# - Accurate time is NOT needed (SNTP not required)
#:########################################################################################:#
#:########################################################################################:#
# SUBSTITUTIONS: Specific device variable substitutions
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
@@ -58,7 +57,7 @@ substitutions:
# Project Naming
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
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_main_topic: "${mqtt_command_main_topic}/${mqtt_device_name}" # Topic we will use to command stuff from external without HA
#:########################################################################################:#
# PACKAGES: Included Common Packages
# https://esphome.io/components/packages.html
@@ -123,7 +121,6 @@ packages:
#diag_debug: !include common/include_debug_diag_sensors.yaml
#diag_resetcount: !include common/include_resetcount_diag_sensors.yaml
#:########################################################################################:#
# ESPHOME:
# https://esphome.io/components/esphome.html
@@ -137,13 +134,12 @@ esphome:
name: "${project_name}"
version: "${project_version}"
#:########################################################################################:#
# ESP PLATFORM AND FRAMEWORK:
# https://esphome.io/components/esp8266.html
#:########################################################################################:#
esp8266:
board: esp01_1m # The original Sonoff Basic
board: esp01_1m # The original Sonoff Basic
restore_from_flash: true # restore some values on reboot
preferences:
@@ -152,7 +148,6 @@ preferences:
mdns:
disabled: false
#:########################################################################################:#
# LOGGING:
# https://esphome.io/components/logger.html
@@ -161,7 +156,6 @@ logger:
level: "${log_level}"
baud_rate: 0 # set to 0 for no logging via UART
#:########################################################################################:#
# STATUS LED:
# https://esphome.io/components/status_led.html
@@ -172,7 +166,6 @@ status_led:
number: GPIO13
inverted: true
#:########################################################################################:#
# SWITCH COMPONENT:
# https://esphome.io/components/switch/
@@ -186,7 +179,6 @@ switch:
restore_mode: RESTORE_DEFAULT_ON
icon: "${relay_icon}"
#:########################################################################################:#
# BINARY SENSORS:
# https://esphome.io/components/binary_sensor/
@@ -222,12 +214,11 @@ binary_sensor:
on_press:
- mqtt.publish:
topic: "${mqtt_main_topic}/relay1/state"
payload: "ON"
payload: "On"
on_release:
- mqtt.publish:
topic: "${mqtt_main_topic}/relay1/state"
payload: "OFF"
payload: "Off"
#:########################################################################################:#
# MQTT:
@@ -237,11 +228,11 @@ mqtt:
on_message:
# Relay 1 control
- topic: "${mqtt_main_topic}/relay1/set"
payload: "ON"
payload: "On"
then:
- switch.turn_on: relay1
- topic: "${mqtt_main_topic}/relay1/set"
payload: "OFF"
payload: "Off"
then:
- switch.turn_off: relay1