Edit esp-officeusbhubpower.yaml
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-officeusbhubpower.yaml
|
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-officeusbhubpower.yaml
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# VERSIONS:
|
# VERSIONS:
|
||||||
|
# V1.2 2026-07-20 Simplified local MQTT command and status topics to the device root
|
||||||
# V1.1 2026-02-25 Updated yaml to zorruno layout V1.1
|
# V1.1 2026-02-25 Updated yaml to zorruno layout V1.1
|
||||||
# V1.0 2025-06-14 Initial Version
|
# V1.0 2025-06-14 Initial Version
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
@@ -22,10 +23,10 @@
|
|||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# MQTT COMMANDS:
|
# MQTT COMMANDS:
|
||||||
# Command (set relay):
|
# Command (set relay):
|
||||||
# - ${mqtt_command_topic}/relay1/set -> ON, OFF
|
# - ${mqtt_command_topic} -> ON, OFF
|
||||||
#
|
#
|
||||||
# Status (published from template sensor):
|
# Status (published from template sensor):
|
||||||
# - ${mqtt_status_topic}/relay1/state -> ON, OFF
|
# - ${mqtt_status_topic} -> ON, OFF
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# OFFLINE NOTES:
|
# OFFLINE NOTES:
|
||||||
# a) Home Assistant OFFLINE, but Network and MQTT ONLINE
|
# a) Home Assistant OFFLINE, but Network and MQTT ONLINE
|
||||||
@@ -54,7 +55,7 @@ substitutions:
|
|||||||
|
|
||||||
# Project Naming
|
# Project Naming
|
||||||
project_name: "Sonoff Technologies.Sonoff Basic V1"
|
project_name: "Sonoff Technologies.Sonoff Basic V1"
|
||||||
project_version: "v1.1"
|
project_version: "v1.2"
|
||||||
|
|
||||||
# Passwords & Secrets (Unfortunately, you cannot use substitutions inside secret names)
|
# Passwords & Secrets (Unfortunately, you cannot use substitutions inside secret names)
|
||||||
api_key: !secret esp-api_key
|
api_key: !secret esp-api_key
|
||||||
@@ -201,12 +202,12 @@ binary_sensor:
|
|||||||
return id(relay1).state;
|
return id(relay1).state;
|
||||||
on_press:
|
on_press:
|
||||||
- mqtt.publish:
|
- mqtt.publish:
|
||||||
topic: "${mqtt_status_topic}/relay1/state"
|
topic: "${mqtt_status_topic}"
|
||||||
payload: "ON"
|
payload: "ON"
|
||||||
retain: false
|
retain: false
|
||||||
on_release:
|
on_release:
|
||||||
- mqtt.publish:
|
- mqtt.publish:
|
||||||
topic: "${mqtt_status_topic}/relay1/state"
|
topic: "${mqtt_status_topic}"
|
||||||
payload: "OFF"
|
payload: "OFF"
|
||||||
retain: false
|
retain: false
|
||||||
|
|
||||||
@@ -227,12 +228,12 @@ status_led:
|
|||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
mqtt:
|
mqtt:
|
||||||
on_message:
|
on_message:
|
||||||
- topic: "${mqtt_command_topic}/relay1/set"
|
- topic: "${mqtt_command_topic}"
|
||||||
payload: "ON"
|
payload: "ON"
|
||||||
then:
|
then:
|
||||||
- switch.turn_on: relay1
|
- switch.turn_on: relay1
|
||||||
|
|
||||||
- topic: "${mqtt_command_topic}/relay1/set"
|
- topic: "${mqtt_command_topic}"
|
||||||
payload: "OFF"
|
payload: "OFF"
|
||||||
then:
|
then:
|
||||||
- switch.turn_off: relay1
|
- switch.turn_off: relay1
|
||||||
Reference in New Issue
Block a user