From e19a3be26a310249b10002667d41f463ab6e62d9 Mon Sep 17 00:00:00 2001 From: Jim Date: Tue, 21 May 2024 20:55:31 +0100 Subject: [PATCH] Add hide_switch option If you don't want the toggle to control the smart plug to show up in HA, set hide_switch to true. Useful if you only want to monitor but not control the smart plug. --- athom-smart-plug-v2.yaml | 2 ++ athom-smart-plug.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/athom-smart-plug-v2.yaml b/athom-smart-plug-v2.yaml index d8a0d3d0..925d188b 100644 --- a/athom-smart-plug-v2.yaml +++ b/athom-smart-plug-v2.yaml @@ -8,6 +8,7 @@ substitutions: project_version: "v2.0.7" sensor_update_interval: "10s" relay_restore_mode: RESTORE_DEFAULT_ON + hide_switch: "false" # Current Limit in Amps. AU Plug = 10. IL, BR, EU, UK, US Plug = 16. current_limit : "16" # Define a domain for this device to use. i.e. iot.home.lan (so device will appear as athom-smart-plug-v2.iot.home.lan in DNS/DHCP logs) @@ -334,6 +335,7 @@ switch: id: relay restore_mode: ${relay_restore_mode} icon: mdi:${power_plug_type} + internal: "${hide_switch}" light: - platform: status_led diff --git a/athom-smart-plug.yaml b/athom-smart-plug.yaml index aeccd5c2..0487c5b9 100644 --- a/athom-smart-plug.yaml +++ b/athom-smart-plug.yaml @@ -9,6 +9,7 @@ substitutions: project_version: "v1.0.3" relay_restore_mode: RESTORE_DEFAULT_OFF sensor_update_interval: 10s + hide_switch: "false" # Current Limit in Amps. AU Plug = 10. IL, BR, EU, UK, US Plug = 16. current_limit : "10" # Define a domain for this device to use. i.e. iot.home.lan (so device will appear as athom-smart-plug-v2.iot.home.lan in DNS/DHCP logs) @@ -345,6 +346,7 @@ switch: id: relay restore_mode: ${relay_restore_mode} icon: mdi:${power_plug_type} + internal: "${hide_switch}" on_turn_on: - light.turn_on: blue_led