Edit esp-officedeskrightgpo.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-25 21:56:00 +12:00
parent 1d02c6c758
commit dc941745d5
+4 -13
View File
@@ -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)
@@ -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,7 +134,6 @@ 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
@@ -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