From 8b39b1e373be7749ec55828cd06d2df3bba3bb5b Mon Sep 17 00:00:00 2001 From: shortmanflee <48691123+shortmanflee@users.noreply.github.com> Date: Sat, 9 Sep 2023 20:44:39 +0100 Subject: [PATCH 1/3] Update athom-smart-plug-v2.yaml --- athom-smart-plug-v2.yaml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/athom-smart-plug-v2.yaml b/athom-smart-plug-v2.yaml index 05be215..d989342 100644 --- a/athom-smart-plug-v2.yaml +++ b/athom-smart-plug-v2.yaml @@ -7,6 +7,7 @@ substitutions: esphome: name: "${device_name}" + friendly_name: "${friendly_name}" name_add_mac_suffix: true project: name: "${project_name}" @@ -52,14 +53,14 @@ globals: binary_sensor: - platform: status - name: "${friendly_name} Status" + name: "Status" - platform: gpio pin: number: 5 mode: INPUT_PULLUP inverted: true - name: "${friendly_name} Power Button" + name: "Power Button" disabled_by_default: true on_multi_click: - timing: @@ -74,31 +75,31 @@ binary_sensor: sensor: - platform: uptime - name: "${friendly_name} Uptime Sensor" + name: "Uptime Sensor" - platform: wifi_signal - name: "${friendly_name} WiFi Signal" + name: "WiFi Signal" update_interval: 60s - platform: cse7766 update_interval: 10s current: - name: "${friendly_name} Current" + name: "Current" filters: - lambda: if (x < 0.060) return 0.0; else return x; #For the chip will report less than 3w power when no load is connected voltage: - name: "${friendly_name} Voltage" + name: "Voltage" power: - name: "${friendly_name} Power" + name: "Power" id: power_sensor filters: - lambda: if (x < 3.0) return 0.0; else return x; #For the chip will report less than 3w power when no load is connected energy: - name: "${friendly_name} Energy" + name: "Energy" id: energy unit_of_measurement: kWh filters: @@ -113,7 +114,7 @@ sensor: previous_energy_value = current_energy_value; - platform: template - name: "${friendly_name} Total Energy" + name: "Total Energy" unit_of_measurement: kWh device_class: "energy" state_class: "total_increasing" @@ -124,7 +125,7 @@ sensor: update_interval: 10s - platform: total_daily_energy - name: "${friendly_name} Total Daily Energy" + name: "Total Daily Energy" restore: true power_id: power_sensor unit_of_measurement: kWh @@ -135,7 +136,7 @@ sensor: button: - platform: factory_reset - name: "Restart with Factory Default Settings" + name: "Factory Reset" id: Reset - platform: safe_mode @@ -144,14 +145,14 @@ button: switch: - platform: gpio - name: "${friendly_name}" + name: none pin: GPIO12 id: relay restore_mode: ${relay_restore_mode} light: - platform: status_led - name: "${friendly_name} Status LED" + name: "Status LED" id: blue_led disabled_by_default: true pin: From 192e1e4ef90b3aab5467ba6be6e02ae74eb0167d Mon Sep 17 00:00:00 2001 From: shortmanflee <48691123+shortmanflee@users.noreply.github.com> Date: Sat, 9 Sep 2023 20:50:47 +0100 Subject: [PATCH 2/3] Update athom-smart-plug-v2.yaml --- athom-smart-plug-v2.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/athom-smart-plug-v2.yaml b/athom-smart-plug-v2.yaml index d989342..86d509b 100644 --- a/athom-smart-plug-v2.yaml +++ b/athom-smart-plug-v2.yaml @@ -1,6 +1,7 @@ substitutions: device_name: "athom-smart-plug-v2" friendly_name: "Athom Smart Plug V2" + device_comment: Anthon Smart Plug V2 project_name: "athom.smart-plug-v2" project_version: "1.1" relay_restore_mode: RESTORE_DEFAULT_OFF @@ -76,10 +77,12 @@ binary_sensor: sensor: - platform: uptime name: "Uptime Sensor" + disabled_by_default: true - platform: wifi_signal name: "WiFi Signal" update_interval: 60s + disabled_by_default: true - platform: cse7766 update_interval: 10s @@ -138,10 +141,12 @@ button: - platform: factory_reset name: "Factory Reset" id: Reset + disabled_by_default: true - platform: safe_mode name: "Safe Mode" internal: false + disabled_by_default: true switch: - platform: gpio @@ -163,10 +168,13 @@ text_sensor: - platform: wifi_info ip_address: name: "IP Address" + disabled_by_default: true ssid: name: "Connected SSID" + disabled_by_default: true mac_address: name: "Mac Address" + disabled_by_default: true time: - platform: sntp From a4e7d60502bc9c4564d67f61097d8d76b525005a Mon Sep 17 00:00:00 2001 From: shortmanflee <48691123+shortmanflee@users.noreply.github.com> Date: Sat, 9 Sep 2023 20:51:40 +0100 Subject: [PATCH 3/3] Update athom-smart-plug-v2.yaml --- athom-smart-plug-v2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/athom-smart-plug-v2.yaml b/athom-smart-plug-v2.yaml index 86d509b..93e52cf 100644 --- a/athom-smart-plug-v2.yaml +++ b/athom-smart-plug-v2.yaml @@ -1,7 +1,7 @@ substitutions: device_name: "athom-smart-plug-v2" friendly_name: "Athom Smart Plug V2" - device_comment: Anthon Smart Plug V2 + device_comment: "Anthon Smart Plug V2" project_name: "athom.smart-plug-v2" project_version: "1.1" relay_restore_mode: RESTORE_DEFAULT_OFF