yaml layout updates to v1.1 and minor fixes

This commit is contained in:
root
2026-03-08 22:52:22 +13:00
parent 2649a33051
commit e09931360a
166 changed files with 486 additions and 360 deletions
+21 -12
View File
@@ -1,13 +1,17 @@
#:########################################################################################:#
# TITLE: BEDROOM 3 LIGHTSWITCH
# zorruno.com layout v1.0 2026
# zorruno.com layout v1.1 2026
#:########################################################################################:#
# REPO:
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-bedrm3lights.yaml
#:########################################################################################:#
# VERSIONS:
# V3.6 2026-03-05 Updated yaml to zorruno layout V1.1
# V3.5 2025-07-24 YAML tidyups
#:########################################################################################:#
# HARDWARE:
# Zemismart KS-811 Double push button (KS-811-2)
# pinout/schematic: https://community.home-assistant.io/t/zemismart-ks-811-working-with-esphome/
# - Zemismart KS-811 Double push button (KS-811-2)
# pinout/schematic: https://community.home-assistant.io/t/zemismart-ks-811-working-with-esphome/
#:########################################################################################:#
# OPERATION NOTES:
# - Virtual 2-button wall switch used to control Bedroom 3 ceiling fan light and to force "all off"
@@ -29,17 +33,17 @@
# a) Home Assistant OFFLINE, but Network and MQTT ONLINE
# - Buttons still publish MQTT commands directly to the remote iFan02 (light and all-off actions)
# - Relay 1 state mirror still updates from subscribed remote light status topic
# - HA entities for this switch device are unavailable until HA returns
# b) MQTT OFFLINE (but WiFi/Network and HA API ONLINE)
# - Buttons cannot control the remote iFan02 (control path is MQTT)
# - Relay 1 will not mirror the remote light status while MQTT is down
# - HA can still see/control the local indicator relays, but those do not affect the fan without MQTT
# c) Entire WiFi/Network OFFLINE
# - No MQTT publish/subscribe and no HA API connectivity
# - Buttons will not control the remote iFan02
# - Local indicator relays remain in their last state until connectivity returns (or reboot)
# - Accurate time is NOT needed (SNTP not required) for core operation
#:########################################################################################:#
#:########################################################################################:#
# SUBSTITUTIONS: Specific device variable substitutions
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
@@ -48,12 +52,12 @@ substitutions:
# Device Naming
device_name: "esp-bedrm3lights"
friendly_name: "Bedroom 3 Lightswitch (2)"
description_comment: "Bedroom 3 Main Lightswitch using a Zemismart KS-811 Double Push Button. Main Lights (1-Virtual), All Lights Off (2-Virtual) (Layout V1.0)"
description_comment: "Bedroom 3 Main Lightswitch using a Zemismart KS-811 Double Push Button. Main Lights (1-Virtual), All Lights Off (2-Virtual) (Layout V1.1)"
device_area: "Bedroom 3" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant.
# Project Naming
project_name: "Zemismart Technologies.KS-811 Double" # Project Details
project_version: "v3.5" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
project_version: "v3.6" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
# Passwords and Secrets
api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names
@@ -90,6 +94,7 @@ substitutions:
switch_1_name: "Main Lights" # Nothing physically connected to this output (ifan02 light is the real load)
switch_2_name: "All Lights Off" # Nothing physically connected to this output
#:########################################################################################:#
# PACKAGES: Included Common Packages
# https://esphome.io/components/packages.html
@@ -129,6 +134,7 @@ 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
@@ -141,21 +147,18 @@ esphome:
project:
name: "${project_name}"
version: "${project_version}"
#on_boot:
# priority: 200
# then:
# - switch.turn_on: Relay_2
#:########################################################################################:#
# ESP PLATFORM AND FRAMEWORK:
# https://esphome.io/components/esp8266/
# https://esphome.io/components/esp32/
#:########################################################################################:#
esp8266:
board: esp01_1m
early_pin_init: false # Recommended false where switches are involved. Defaults to true.
board_flash_mode: dout # Default is dout
#:########################################################################################:#
# LOGGING: ESPHome Logging Enable
# https://esphome.io/components/logger.html
@@ -166,6 +169,7 @@ logger:
#esp8266_store_log_strings_in_flash: false
#tx_buffer_size: 64
#:########################################################################################:#
# GLOBAL VARIABLES:
# https://esphome.io/guides/automations.html#global-variables
@@ -176,6 +180,7 @@ globals:
restore_value: false
initial_value: "0"
#:########################################################################################:#
# STATUS LED:
# https://esphome.io/components/status_led.html
@@ -185,6 +190,7 @@ status_led:
number: GPIO2
inverted: true
#:########################################################################################:#
# BINARY SENSORS:
# https://esphome.io/components/binary_sensor/
@@ -230,6 +236,7 @@ binary_sensor:
retain: false
- platform: gpio
id: button_2
pin:
number: GPIO05
mode: INPUT
@@ -248,6 +255,7 @@ binary_sensor:
qos: 0
retain: false
#:########################################################################################:#
# SWITCH COMPONENT:
# https://esphome.io/components/switch/
@@ -264,6 +272,7 @@ switch:
pin: GPIO12
id: Relay_2
#:########################################################################################:#
# MQTT:
# This adds device-specific MQTT command triggers to the common MQTT configuration.