Skip to content

Commit

Permalink
Add hide_switch option
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Jimver committed Feb 20, 2025
1 parent f048167 commit e19a3be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions athom-smart-plug-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -334,6 +335,7 @@ switch:
id: relay
restore_mode: ${relay_restore_mode}
icon: mdi:${power_plug_type}
internal: "${hide_switch}"

light:
- platform: status_led
Expand Down
2 changes: 2 additions & 0 deletions athom-smart-plug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit e19a3be

Please sign in to comment.