yaml layout updates to v1.1 and minor fixes

This commit is contained in:
root
2026-03-04 23:41:30 +13:00
parent a8d2927274
commit 2649a33051
10 changed files with 724 additions and 342 deletions
+24 -4
View File
@@ -1,12 +1,16 @@
#:########################################################################################:#
# TITLE: CEILING FAN - BEDROOM 2
# 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-bedrm2ceilingfan.yaml
#:########################################################################################:#
# VERSIONS:
# V1.1 2026-03-04 Updated yaml to zorruno layout V1.1
# V1.0 2025-07-21 First Setup (and replacement of Tasmota)
#:########################################################################################:#
# HARDWARE:
# Controlled by a Sonoff iFan02 (3-speed fan + 1x light relay)
# - Controlled by a Sonoff iFan02 (3-speed fan + 1x light relay)
#:########################################################################################:#
# OPERATION NOTES:
# - Fan and light can be controlled via MQTT (local topics below) and via Home Assistant API
@@ -36,8 +40,10 @@
# - No HA API and no MQTT control available
# - If power remains on, the relays keep their last driven state (fan speed relays and light relay)
# - If the device reboots while offline, fan/light restore_mode defaults apply (RESTORE_DEFAULT_OFF)
# - Accurate time is NOT needed (SNTP not required) for core operation (no schedules/timeclocks used)
#:########################################################################################:#
#:########################################################################################:#
# SUBSTITUTIONS: Specific device variable substitutions
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
@@ -46,12 +52,12 @@ substitutions:
# Device Naming
device_name: "esp-bedrm2ceilingfan"
friendly_name: "Bedroom 2 Ceiling Fan"
description_comment: "3 Speed Overhead Ceiling Fan Bedroom 2 :: Sonoff iFan02 (Layout V1.0)"
description_comment: "3 Speed Overhead Ceiling Fan Bedroom 2 :: Sonoff iFan02 (Layout V1.1)"
device_area: "Bedroom 2" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant.
# Project Naming
project_name: "Sonoff Technologies.Sonoff iFan02" # Project Details
project_version: "v1.0" # 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 and Secrets
api_key: !secret esp-api_key
@@ -79,6 +85,7 @@ substitutions:
switch_3_name: "Fan 3 Relay"
switch_4_name: "Fan 4 Relay"
#:########################################################################################:#
# PACKAGES: Included Common Packages
# https://esphome.io/components/packages.html
@@ -118,6 +125,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,6 +149,7 @@ esphome:
# - "-fno-exceptions" # strip C++ exceptions
# - "-fno-rtti" # strip C++ RTTI
#:########################################################################################:#
# ESP PLATFORM AND FRAMEWORK:
# https://esphome.io/components/esp8266/
@@ -156,6 +165,7 @@ preferences:
mdns:
disabled: true # Disabling will make the build file smaller (and it is still available via static IP)
#:########################################################################################:#
# GLOBAL VARIABLES:
# https://esphome.io/guides/automations.html#global-variables
@@ -166,6 +176,7 @@ globals:
restore_value: true
initial_value: "0"
#:########################################################################################:#
# LOGGING: ESPHome Logging Enable
# https://esphome.io/components/logger.html
@@ -174,6 +185,7 @@ logger:
level: "${log_level}" # INFO suggested, or DEBUG for testing
baud_rate: 0 # set to 0 for no logging via UART (UART0 used for fan MCU sniffing)
#:########################################################################################:#
# UART:
# Fan MCU / RF Remote Sniff (iFan02 -> ESP over UART0)
@@ -191,6 +203,7 @@ uart:
# NOTE: If no frames appear at either 9600 or 19200, try moving rx_pin to GPIO13 and reflash:
# rx_pin: GPIO13
#:########################################################################################:#
# INTERVAL COMPONENT:
# https://esphome.io/components/interval.html
@@ -222,6 +235,7 @@ interval:
frame.clear();
}
#:########################################################################################:#
# TEXT SENSORS COMPONENT:
# https://esphome.io/components/text_sensor/index.html
@@ -232,6 +246,7 @@ text_sensor:
name: "iFan02 Remote Last Frame"
update_interval: never
#:########################################################################################:#
# MQTT:
# This adds device-specific MQTT command triggers to the common MQTT configuration.
@@ -282,6 +297,7 @@ mqtt:
id: ifan02_fan
speed: !lambda "return id(speed_value);"
#:########################################################################################:#
# SWITCH COMPONENT:
# https://esphome.io/components/switch/
@@ -311,6 +327,7 @@ switch:
restore_mode: RESTORE_DEFAULT_OFF
internal: true
#:########################################################################################:#
# SELECT COMPONENT:
# https://esphome.io/components/select/index.html
@@ -375,6 +392,7 @@ select:
id: ifan02_fan
speed: 3
#:########################################################################################:#
# OUTPUT COMPONENT:
# https://esphome.io/components/output/
@@ -412,6 +430,7 @@ output:
id(fan4sw).turn_on();
}
#:########################################################################################:#
# LIGHT COMPONENT:
# https://esphome.io/components/light/
@@ -432,6 +451,7 @@ light:
topic: "${mqtt_local_status_topic}/light/state"
payload: "OFF"
#:########################################################################################:#
# FAN COMPONENT:
# https://esphome.io/components/fan/index.html