########################################################################################## ########################################################################################## # MAIN DISHWASHER POWER # Controlled by a Athom Smart Plug V3 # package_import_url: github://athom-tech/athom-configs/athom-smart-plug.yaml # # 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 # ########################################################################################## ########################################################################################## ########################################################################################## # 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. # 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 # 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 static_ip_address: !secret esp-maindishwasherpower_ip # 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 # Device 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 # https://esphome.io/components/packages.html ########################################################################################## packages: common_wifi: !include file: common/network_common.yaml vars: local_device_name: "${device_name}" local_static_ip_address: "${static_ip_address}" local_ota_pass: "${ota_pass}" common_api: !include file: common/api_common.yaml vars: local_api_key: "${api_key}" #common_webportal: !include # file: common/webportal_common.yaml common_mqtt: !include file: common/mqtt_common.yaml vars: local_device_name: "${device_name}" common_sntp: !include file: common/sntp_common.yaml common_general_sensors: !include file: common/sensors_common.yaml vars: local_friendly_name: "${friendly_name}" local_update_interval: "${update_interval}" # Device Specific included packages common_athompowermonV3: !include file: common/athompowermonv3_common.yaml vars: local_current_limit: "${current_limit}" ########################################################################################## # 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 min_version: 2024.6.0 project: name: "${project_name}" version: "${project_version}" platformio_options: board_build.mcu: esp32c3 board_build.variant: esp32c3 board_build.flash_mode: dio on_boot: priority: 200 then: - switch.turn_on: "relay" ########################################################################################## # 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 preferences: flash_write_interval: 5min esp32_improv: authorizer: none ########################################################################################## # ESPHome LOGGING # https://esphome.io/components/logger.html ########################################################################################## logger: level: "${log_level}" #INFO Level 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 (eg PZEM) #esp8266_store_log_strings_in_flash: false #tx_buffer_size: 64 ########################################################################################## # BINARY SENSORS # https://esphome.io/components/binary_sensor/ ########################################################################################## binary_sensor: - platform: gpio pin: number: GPIO03 mode: INPUT_PULLUP inverted: true name: "Power Button" id: power_button filters: - delayed_on: 20ms on_click: - min_length: 20ms max_length: 500ms then: - switch.toggle: id: relay - platform: template name: "Relay Status" lambda: |- return id(relay).state; ################################################################################################# # SWITCH COMPONENT # https://esphome.io/components/switch/ ################################################################################################# switch: - platform: gpio name: "Power Output" pin: GPIO05 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}"