mirror of
https://github.com/esphome/esphome.git
synced 2026-10-05 10:31:29 +00:00
[switch] Use register_apply_action for the switch actions (#19498)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user