[switch] Use register_apply_action for the switch actions (#19498)

This commit is contained in:
J. Nick Koston
2026-09-23 12:16:47 +01:00
committed by GitHub
parent 01fc7511ae
commit 56f7280d55
4 changed files with 20 additions and 95 deletions
@@ -257,8 +257,14 @@ switch:
return false;
turn_on_action:
- logger.log: "turn_on_action"
- switch.template.publish:
id: test_switch
state: true
turn_off_action:
- logger.log: "turn_off_action"
- switch.template.publish:
id: test_switch
state: !lambda return false;
button:
- platform: template