yaml layout updates to v1.1 and minor fixes
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
#:########################################################################################:#
|
||||
# TITLE: CEILING FAN - BEDROOM 3
|
||||
# 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-bedrm3ceilingfan.yaml
|
||||
#:########################################################################################:#
|
||||
# VERSIONS:
|
||||
# V1.1 2026-03-05 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)
|
||||
# - Sonoff iFan02 (ESP8266) (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, relays keep their last driven state
|
||||
# - 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
|
||||
#:########################################################################################:#
|
||||
|
||||
|
||||
#:########################################################################################:#
|
||||
# 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-bedrm3ceilingfan"
|
||||
friendly_name: "Bedroom 3 Ceiling Fan"
|
||||
description_comment: "3 Speed Overhead Ceiling Fan Bedroom 3 :: Sonoff iFan02 (Layout V1.0)"
|
||||
description_comment: "3 Speed Overhead Ceiling Fan Bedroom 3 :: Sonoff iFan02 (Layout V1.1)"
|
||||
device_area: "Bedroom 3" # 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
|
||||
@@ -138,10 +146,10 @@ esphome:
|
||||
topic: "${mqtt_local_status_topic}/speed/state"
|
||||
payload: !lambda "return to_string(id(speed_value));"
|
||||
|
||||
|
||||
#:########################################################################################:#
|
||||
# ESP PLATFORM AND FRAMEWORK:
|
||||
# https://esphome.io/components/esp8266/
|
||||
# https://esphome.io/components/esp32/
|
||||
#:########################################################################################:#
|
||||
esp8266:
|
||||
board: esp01_1m # Sonoff iFan02
|
||||
@@ -153,6 +161,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
|
||||
@@ -163,6 +172,7 @@ globals:
|
||||
restore_value: true
|
||||
initial_value: "0"
|
||||
|
||||
|
||||
#:########################################################################################:#
|
||||
# LOGGING: ESPHome Logging Enable
|
||||
# https://esphome.io/components/logger.html
|
||||
@@ -171,6 +181,7 @@ logger:
|
||||
level: "${log_level}" # INFO suggested, or DEBUG for testing
|
||||
baud_rate: 0 # set to 0 for no logging via UART, needed if you are using it for other serial things
|
||||
|
||||
|
||||
#:########################################################################################:#
|
||||
# MQTT:
|
||||
# This adds device-specific MQTT command triggers to the common MQTT configuration.
|
||||
@@ -221,6 +232,7 @@ mqtt:
|
||||
id: ifan02_fan
|
||||
speed: !lambda "return id(speed_value);"
|
||||
|
||||
|
||||
#:########################################################################################:#
|
||||
# SWITCH COMPONENT:
|
||||
# https://esphome.io/components/switch/
|
||||
@@ -250,6 +262,7 @@ switch:
|
||||
restore_mode: RESTORE_DEFAULT_OFF
|
||||
internal: true
|
||||
|
||||
|
||||
#:########################################################################################:#
|
||||
# SELECT COMPONENT:
|
||||
# https://esphome.io/components/select/index.html
|
||||
@@ -314,6 +327,7 @@ select:
|
||||
id: ifan02_fan
|
||||
speed: 3
|
||||
|
||||
|
||||
#:########################################################################################:#
|
||||
# OUTPUT COMPONENT:
|
||||
# https://esphome.io/components/output/
|
||||
@@ -351,6 +365,7 @@ output:
|
||||
id(fan4sw).turn_on();
|
||||
}
|
||||
|
||||
|
||||
#:########################################################################################:#
|
||||
# LIGHT COMPONENT:
|
||||
# https://esphome.io/components/light/
|
||||
@@ -371,6 +386,7 @@ light:
|
||||
topic: "${mqtt_local_status_topic}/light/state"
|
||||
payload: "OFF"
|
||||
|
||||
|
||||
#:########################################################################################:#
|
||||
# FAN COMPONENT:
|
||||
# https://esphome.io/components/fan/index.html
|
||||
|
||||
Reference in New Issue
Block a user