Merge branch 'main' into add-ids-athom-smart-plug

This commit is contained in:
Aiden authored and GitHub committed 2026-08-31 17:03:12 +08:00
commit ccacd2de38
3 files changed
+65 -5

No files matched your search

+21 -2
View File
@@ -234,11 +234,21 @@ binary_sensor:
- ON for at most 1s
- OFF for at least 0.2s
then:
- switch.toggle: relay
# Ignore short press when child lock is on, to stop kids toggling the socket
- if:
condition:
switch.is_off: child_lock
then:
- switch.toggle: relay
- timing:
- ON for at least 4s
then:
- button.press: Reset
# Ignore long press when child lock is on, to prevent accidental factory reset
- if:
condition:
switch.is_off: child_lock
then:
- button.press: Reset
sensor:
- platform: uptime
@@ -373,6 +383,15 @@ switch:
restore_mode: ${relay_restore_mode}
icon: mdi:${power_plug_type}
# Child lock: when on, ignore physical button short/long press, but keep remote (HA/web) control working
- platform: template
name: "Child Lock"
id: child_lock
icon: mdi:lock
optimistic: true
restore_mode: RESTORE_DEFAULT_OFF # Keep last state after power loss/reboot, default off on first boot
entity_category: config
light:
- platform: status_led
name: "Status LED"