From e318e992b4b6bf5f4c6616bd9f7ec728ea5382d9 Mon Sep 17 00:00:00 2001 From: Jimver Date: Thu, 20 Feb 2025 22:44:13 +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.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/athom-smart-plug.yaml b/athom-smart-plug.yaml index c1c2f7c..f910f20 100644 --- a/athom-smart-plug.yaml +++ b/athom-smart-plug.yaml @@ -13,6 +13,8 @@ substitutions: project_version: "v1.0.7" # Restore the relay (GPO switch) upon reboot to state: relay_restore_mode: RESTORE_DEFAULT_ON + # Hide the switch in the frontend + hide_switch: "false" # Set the update interval for sensors sensor_update_interval: 10s # Current Limit in Amps. AU Plug = 10. IL, BR, EU, UK, US Plug = 16. @@ -311,6 +313,7 @@ switch: id: relay restore_mode: ${relay_restore_mode} icon: mdi:${power_plug_type} + internal: "{$hide_switch}" light: - platform: status_led