more esphome devices and fixes
This commit is contained in:
@@ -1,34 +1,67 @@
|
||||
##########################################################################################
|
||||
##########################################################################################
|
||||
# MAIN DISHWASHER POWER
|
||||
# Controlled by a Athom Smart Plug V3
|
||||
# package_import_url: github://athom-tech/athom-configs/athom-smart-plug.yaml
|
||||
#
|
||||
#:########################################################################################:#
|
||||
# TITLE: MAIN DISHWASHER POWER
|
||||
# zorruno.com layout v1.1 2026
|
||||
#:########################################################################################:#
|
||||
# REPO:
|
||||
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-maindishwasherpower.yaml
|
||||
#:########################################################################################:#
|
||||
# VERSIONS:
|
||||
# V3.5 2026-03-11 Updated yaml to zorruno layout V1.1
|
||||
# V3.4 2025-07-30 Changed to Athom V3
|
||||
# V1.1 2025-06-12 package added for energy entities
|
||||
# V1.0 2025-06-10 YAML Tidyups
|
||||
#
|
||||
##########################################################################################
|
||||
##########################################################################################
|
||||
#:########################################################################################:#
|
||||
# HARDWARE:
|
||||
# - Athom Smart Plug V3
|
||||
# - ESP32-C3 based
|
||||
# - Relay output on GPIO5
|
||||
# - Local power button on GPIO3
|
||||
# - Power monitoring via Athom V3 common package
|
||||
# - package_import_url reference: github://athom-tech/athom-configs/athom-smart-plug.yaml
|
||||
#:########################################################################################:#
|
||||
# OPERATION NOTES:
|
||||
# - Controls power to the main dishwasher
|
||||
# - Uses Athom Smart Plug V3 hardware and Athom V3 common power monitor package
|
||||
# - Relay is turned ON at boot
|
||||
# - Local power button toggles the relay
|
||||
# - Relay status is exposed as a template binary sensor
|
||||
# - Power/energy monitoring entities are provided by the included Athom V3 package
|
||||
#:########################################################################################:#
|
||||
# OFFLINE NOTES:
|
||||
# a) Home Assistant offline (network and MQTT online):
|
||||
# - Device continues operating normally
|
||||
# - Relay can still be controlled locally by the hardware power button
|
||||
# - MQTT remains available if your broker is online
|
||||
#
|
||||
# b) MQTT offline (or HA/MQTT offline):
|
||||
# - Device continues operating locally
|
||||
# - Relay control and local power monitoring continue to work
|
||||
#
|
||||
# c) Entire WiFi/Network offline:
|
||||
# - Device continues operating locally
|
||||
# - Relay control and local power monitoring continue to work
|
||||
# - Accurate time is not needed; SNTP is not required for operation
|
||||
#:########################################################################################:#
|
||||
|
||||
##########################################################################################
|
||||
# SPECIFIC DEVICE VARIABLE SUBSTITUTIONS
|
||||
#:########################################################################################:#
|
||||
# SUBSTITUTIONS:
|
||||
# Specific device variable substitutions
|
||||
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
|
||||
##########################################################################################
|
||||
#:########################################################################################:#
|
||||
substitutions:
|
||||
# Device Naming
|
||||
device_name: "esp-maindishwasherpower"
|
||||
friendly_name: "Main Dishwasher Power"
|
||||
description_comment: "Main Dishwasher Power Monitor :: Athom Smart Plug Power Monitor V3"
|
||||
device_area: "Kitchen" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant.
|
||||
|
||||
description_comment: "Main Dishwasher Power Monitor :: Athom Smart Plug Power Monitor V3 (Layout V1.1)"
|
||||
device_area: "Kitchen"
|
||||
|
||||
# Project Naming
|
||||
project_name: "Athom Technology.Smart Plug V3" # Project Details
|
||||
project_version: "v1.1" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
|
||||
project_name: "Athom Technology.Smart Plug V3"
|
||||
project_version: "v3.5"
|
||||
|
||||
# Passwords
|
||||
api_key: !secret esp-maindishwasherpower_api_key # unfortunately you can't use substitutions inside secrets names
|
||||
ota_pass: !secret esp-maindishwasherpower_ota_pass # unfortunately you can't use substitutions inside secrets names
|
||||
api_key: !secret esp-maindishwasherpower_api_key
|
||||
ota_pass: !secret esp-maindishwasherpower_ota_pass
|
||||
static_ip_address: !secret esp-maindishwasherpower_ip
|
||||
|
||||
# If we are changing IP addresses, you must update the current IP address here, otherwise it remains
|
||||
@@ -36,17 +69,18 @@ substitutions:
|
||||
current_ip_address: ${static_ip_address}
|
||||
|
||||
# Device Settings
|
||||
log_level: "INFO" # Define logging level: NONE, ERROR, WARN, INFO, DEBUG (Default), VERBOSE, VERY_VERBOSE
|
||||
update_interval: "60s" # update time for for general sensors etc
|
||||
log_level: "INFO"
|
||||
update_interval: "60s"
|
||||
|
||||
# Device Settings
|
||||
# Relay / Load Settings
|
||||
relay_icon: "mdi:dishwasher"
|
||||
current_limit : "10" # Current Limit in Amps. AU Plug = 10. IL, BR, EU, UK, US Plug = 16.
|
||||
|
||||
##########################################################################################
|
||||
# PACKAGES: Included Common Packages
|
||||
current_limit: "10" # Current Limit in Amps. AU Plug = 10. IL, BR, EU, UK, US Plug = 16.
|
||||
|
||||
#:########################################################################################:#
|
||||
# PACKAGES:
|
||||
# Included Common Packages
|
||||
# https://esphome.io/components/packages.html
|
||||
##########################################################################################
|
||||
#:########################################################################################:#
|
||||
packages:
|
||||
#### WIFI, Network (Static/DHCP/IPV6 etc), Fallback AP, Safemode ####
|
||||
common_wifi: !include
|
||||
@@ -54,8 +88,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
|
||||
@@ -69,34 +103,35 @@ packages:
|
||||
file: common/mqtt_common.yaml
|
||||
vars:
|
||||
local_device_name: "${device_name}"
|
||||
|
||||
|
||||
#### WEB PORTAL ####
|
||||
#common_webportal: !include common/webportal_common.yaml
|
||||
|
||||
#### SNTP (Only use if you want/need accurate timeclocks) ####
|
||||
common_sntp: !include common/sntp_common.yaml
|
||||
common_sntp: !include common/sntp_common.yaml
|
||||
|
||||
#### DIAGNOSTICS Sensors ####
|
||||
diag_basic: !include common/include_basic_diag_sensors.yaml
|
||||
diag_more: !include common/include_more_diag_sensors.yaml
|
||||
diag_debug: !include common/include_debug_diag_sensors.yaml
|
||||
diag_resetcount: !include common/include_resetcount_diag_sensors.yaml
|
||||
diag_basic: !include common/include_basic_diag_sensors.yaml
|
||||
diag_more: !include common/include_more_diag_sensors.yaml
|
||||
diag_debug: !include common/include_debug_diag_sensors.yaml
|
||||
diag_resetcount: !include common/include_resetcount_diag_sensors.yaml
|
||||
|
||||
# Device Specific included packages
|
||||
common_athompowermonV3: !include
|
||||
#### DEVICE SPECIFIC INCLUDED PACKAGES ####
|
||||
common_athompowermonv3: !include
|
||||
file: common/athompowermonv3_common.yaml
|
||||
vars:
|
||||
local_current_limit: "${current_limit}"
|
||||
|
||||
##########################################################################################
|
||||
# ESPHome
|
||||
#:########################################################################################:#
|
||||
# ESPHOME:
|
||||
# https://esphome.io/components/esphome.html
|
||||
##########################################################################################
|
||||
#:########################################################################################:#
|
||||
esphome:
|
||||
name: "${device_name}"
|
||||
friendly_name: "${friendly_name}"
|
||||
comment: "${description_comment}" #Appears on the esphome page in HA
|
||||
area: "${device_area}"
|
||||
name_add_mac_suffix: False
|
||||
comment: "${description_comment}"
|
||||
area: "${device_area}"
|
||||
name_add_mac_suffix: false
|
||||
min_version: 2024.6.0
|
||||
project:
|
||||
name: "${project_name}"
|
||||
@@ -108,19 +143,19 @@ esphome:
|
||||
on_boot:
|
||||
priority: 200
|
||||
then:
|
||||
- switch.turn_on: "relay"
|
||||
- switch.turn_on: relay
|
||||
|
||||
##########################################################################################
|
||||
# ESP Platform and Framework
|
||||
#:########################################################################################:#
|
||||
# ESP PLATFORM AND FRAMEWORK:
|
||||
# https://esphome.io/components/esp32.html
|
||||
##########################################################################################
|
||||
#:########################################################################################:#
|
||||
esp32:
|
||||
board: esp32-c3-devkitm-1
|
||||
flash_size: 4MB
|
||||
variant: ESP32C3
|
||||
framework:
|
||||
type: esp-idf # "esp-idf" OR "arduino". Suggested ESP-IDF Framework, or Plug Out the UART Cable Might Cause ESP32 Hang.
|
||||
version: recommended # recommended, latest or dev
|
||||
type: esp-idf
|
||||
version: recommended
|
||||
|
||||
preferences:
|
||||
flash_write_interval: 5min
|
||||
@@ -128,24 +163,24 @@ preferences:
|
||||
esp32_improv:
|
||||
authorizer: none
|
||||
|
||||
##########################################################################################
|
||||
# ESPHome LOGGING
|
||||
#:########################################################################################:#
|
||||
# LOGGER:
|
||||
# https://esphome.io/components/logger.html
|
||||
##########################################################################################
|
||||
#:########################################################################################:#
|
||||
logger:
|
||||
level: "${log_level}" #INFO Level suggested, or DEBUG for testing
|
||||
level: "${log_level}"
|
||||
#baud_rate: 0 # set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
||||
#esp8266_store_log_strings_in_flash: false
|
||||
#tx_buffer_size: 64
|
||||
|
||||
##########################################################################################
|
||||
# BINARY SENSORS
|
||||
#:########################################################################################:#
|
||||
# BINARY SENSORS:
|
||||
# https://esphome.io/components/binary_sensor/
|
||||
##########################################################################################
|
||||
#:########################################################################################:#
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO03
|
||||
number: GPIO3
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: "Power Button"
|
||||
@@ -156,24 +191,22 @@ binary_sensor:
|
||||
- min_length: 20ms
|
||||
max_length: 500ms
|
||||
then:
|
||||
- switch.toggle:
|
||||
id: relay
|
||||
|
||||
- switch.toggle: relay
|
||||
|
||||
- platform: template
|
||||
name: "Relay Status"
|
||||
lambda: |-
|
||||
return id(relay).state;
|
||||
|
||||
#################################################################################################
|
||||
# SWITCH COMPONENT
|
||||
#:########################################################################################:#
|
||||
# SWITCH COMPONENT:
|
||||
# https://esphome.io/components/switch/
|
||||
#################################################################################################
|
||||
#:########################################################################################:#
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "Power Output"
|
||||
pin: GPIO05
|
||||
pin: GPIO5
|
||||
id: relay
|
||||
restore_mode: RESTORE_DEFAULT_ON # Ensures the relay is restored (or off) at boot
|
||||
#internal: true # Hides the switch from Home Assistant
|
||||
icon: "${relay_icon}"
|
||||
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
#internal: true
|
||||
icon: "${relay_icon}"
|
||||
Reference in New Issue
Block a user