diff --git a/esphome/esp-spare1-athomv1.yaml b/esphome/esp-spare1-athomv1.yaml index bec1ed0..5616b2c 100644 --- a/esphome/esp-spare1-athomv1.yaml +++ b/esphome/esp-spare1-athomv1.yaml @@ -6,7 +6,7 @@ # # V1.1 2025-06-12 package added for energy entities # V1.0 2025-06-10 YAML Tidyups -# +# ########################################################################################## ########################################################################################## @@ -21,11 +21,11 @@ substitutions: #friendly_name: "Main Dishwashers Power" friendly_name: "Spare1 Athomv1" description_comment: "Main Dishwashers Power Monitor :: Athom Smart Plug Power Monitor V1" - device_area: "Kitchen" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant. - + device_area: "Kitchen" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant. + # Project Naming - project_name: "Athom Technology.Smart Plug V1" # 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 V1" # 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-api_key # unfortunately you can't use substitutions inside secrets names @@ -38,8 +38,8 @@ substitutions: # Device Settings relay_icon: "mdi:dishwasher" - current_limit : "10" # Current Limit in Amps. AU Plug = 10. IL, BR, EU, UK, US Plug = 16. - + 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 @@ -84,40 +84,35 @@ esphome: name: "${device_name}" friendly_name: "${friendly_name}" comment: "${description_comment}" # Appears on the esphome page in HA - area: "${device_area}" + area: "${device_area}" name_add_mac_suffix: False min_version: 2024.6.0 project: name: "${project_name}" version: "${project_version}" - on_boot: - priority: 200 - then: - - switch.turn_on: "relay" - ########################################################################################## # ESP Platform and Framework # https://esphome.io/components/esp32.html ########################################################################################## esp8266: board: esp8285 - restore_from_flash: True # mainly for calculating cumulative energy, but not that important here + restore_from_flash: True # mainly for calculating cumulative energy, but not that important here preferences: flash_write_interval: 5min mdns: disabled: false - + #dashboard_import: # package_import_url: github://athom-tech/esp32-configs/athom-smart-plug.yaml -########################################################################################## +########################################################################################## # ESPHome LOGGING # https://esphome.io/components/logger.html -########################################################################################## +########################################################################################## logger: - level: "${log_level}" #INFO Level suggested, or DEBUG for testing + 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 @@ -149,9 +144,9 @@ binary_sensor: - min_length: 20ms max_length: 500ms then: - - switch.toggle: - id: relay - + - switch.toggle: + id: relay + - platform: template name: "Relay Status" lambda: |- @@ -166,7 +161,6 @@ switch: name: "Power Output" pin: GPIO14 id: relay - restore_mode: RESTORE_DEFAULT_ON # Ensures the relay is restored (or off) at boot + restore_mode: RESTORE_DEFAULT_OFF # Restore previous state, default off #internal: true # Hides the switch from Home Assistant - icon: "${relay_icon}" - + icon: "${relay_icon}"