more esphome devices and fixes

This commit is contained in:
root
2026-04-03 21:34:23 +13:00
parent e09931360a
commit f7bfa78835
96 changed files with 4870 additions and 2523 deletions
+20 -17
View File
@@ -1,8 +1,12 @@
#:########################################################################################:#
# TITLE: MASTER BATHROOM HEATED TOWEL RAIL
# 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-masterbathtowelrail.yaml
#:########################################################################################:#
# VERSIONS:
# V2.3 2026-03-11 Updated yaml to zorruno layout V1.1
# V2.2 2026-01-30 Added Morning/Evening Timer enable switches (gate timer windows)
# V2.1 2025-06-12 Added select and button to chose modes, added countdown & startup to boost
# V2.0 2025-06-05 YAML Tidyups
@@ -10,8 +14,8 @@
# V1.0 2025-02-14 Initial Version
#:########################################################################################:#
# HARDWARE:
# Controlled by a Sonoff Basic
# pinout/schematic: https://devices.esphome.io/devices/sonoff-basic-r4-v1.0/
# - Controlled by a Sonoff Basic
# - pinout/schematic: https://devices.esphome.io/devices/sonoff-basic-r4-v1.0/
#:########################################################################################:#
# OPERATION NOTES:
# - It allows the device to work in a standalone timer style operation
@@ -21,7 +25,7 @@
# - It uses SNTP for time setting (but obviously only if wifi & networking are working)
# - It will default to an internal timer if no wifi. To reset internal timer, reboot the device at 12pm (noon)
# - If on a network and there is a MQTT server, you can set the on/off times via MQTT (See below commands)
# - You can set 4 modes ON/OFF/TIMER/BOOST via MQTT. Setting BOOST gives you a oneshot operation
# - You can set 4 modes ON/OFF/TIMER/BOOST via MQTT. Setting BOOST gives you a oneshot operation
# - Any new timer times set via MQTT will be remembered though a reboot
# - On startup, or a reboot, the device will always turn on for the BOOST Duration (BOOST mode, default 2 hours)
# - TIMER mode will always be switched on after BOOST mode is complete
@@ -30,7 +34,7 @@
#:########################################################################################:#
# MQTT COMMANDS:
# Values will be set in place on the update_interval time, not immediately
# Use 00:00 in 24hr format for time setting. (Note there is no weekday/weekend setting)
# Use 00:00 in 24hr format for time setting. (Note there is no weekday/weekend setting)
# mqtt_timer_topic/morning-on/06:00 : Time device will go on
# mqtt_timer_topic/morning-off/08:00 : Time device will go off
# mqtt_timer_topic/evening-on/09:00 : Time device will go on
@@ -39,7 +43,7 @@
# mqtt_timer_topic/operation/ON : Device permanently on
# mqtt_timer_topic/operation/OFF : Device permanently off
# mqtt_timer_topic/operation/TIMER : Device will obey timer settings
# mqtt_timer_topic/operation/BOOST : Turn on for (boost_duration) minutes then BOOST (also on startup)
# mqtt_timer_topic/operation/BOOST : Turn on for (boost_duration) minutes then BOOST (also on startup)
#
# operation_mode:
# 0 = OFF
@@ -50,15 +54,14 @@
# OFFLINE NOTES:
# a) Home Assistant OFFLINE, but Network and MQTT ONLINE
# - The towel rail will stick to its assigned schedule (and should remember on reboot)
# - Shedule times and on/off switching can still occur via MQTT
# - Schedule times and on/off switching can still occur via MQTT
# - Other switches such as the IR Heater/Fan combo can still command the towel rail
# b) HA/MQTT OFFLINE
# With no automation controllers, the HTR will still remember its timing functions, and will
# turn on once or twice per day. If internet/wifi is still available, timing will be accurate.
# - With no automation controllers, the HTR will still remember its timing functions, and will
# turn on once or twice per day. If internet/wifi is still available, timing will be accurate.
# c) Internet/Wifi OFFLINE
# The HTR will still come on once or twice per day (depending on previous settings) however
# timing will likely shift. To make timing more accurate, it can be powered down then up at 12pm.
# Obviously this may drift again over time.
# - The HTR will still come on once or twice per day (depending on previous settings)
# - Timeclocks will drift without SNTP and can be reset by power cycling at 12pm (midday)
#:########################################################################################:#
#:########################################################################################:#
@@ -69,12 +72,12 @@ substitutions:
# Device Naming
device_name: "esp-masterbathtowelrail"
friendly_name: "Master Bathroom Towelrail"
description_comment: "Sonoff Basic controlling ON/OFF/Timer for the Heated Towel Rail in the Master Bathroom"
description_comment: "Sonoff Basic controlling ON/OFF/Timer for the Heated Towel Rail in the Master Bathroom (Layout V1.1)"
device_area: "Main Bathroom" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant.
# Project Naming
project_name: "Sonoff Technologies.Sonoff Basic V1" # Project Details
project_version: "v2.2" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
project_version: "v2.3" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
# Passwords
api_key: !secret esp-masterbathtowelrail_api_key # unfortunately you can't use substitutions inside secrets names
@@ -109,8 +112,8 @@ packages:
vars:
local_device_name: "${device_name}"
local_static_ip_address: "${static_ip_address}"
local_ota_pass: "${ota_pass}"
local_current_ip_address: "${current_ip_address}"
local_ota_pass: "${ota_pass}"
#### HOME ASSISTANT API (choose encryption or no encryption options) ####
common_api: !include
@@ -606,7 +609,7 @@ sensor:
unit_of_measurement: "mins"
accuracy_decimals: "0"
update_interval: "${update_interval}"
internal: True # No need to show this in Home Assistant
internal: true # No need to show this in Home Assistant
lambda: |-
return id(current_mins);
@@ -787,4 +790,4 @@ interval:
//id(mqtt_client).publish("${mqtt_timer_topic}/operation", "TIMER");
}
}
- script.execute: evaluate_relay_state
- script.execute: evaluate_relay_state