1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-06 05:12:21 +01:00
Files
esphome/tests/components/switch/common.yaml
Edward Firmo c4d1b1317a [switch] Add switch.control automation action (#10105)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2025-08-08 08:55:54 +10:00

20 lines
395 B
YAML

binary_sensor:
- platform: switch
id: some_binary_sensor
name: "Template Switch State"
source_id: the_switch
switch:
- platform: template
name: "Template Switch"
id: the_switch
optimistic: true
esphome:
on_boot:
- switch.turn_on: the_switch
- switch.turn_off: the_switch
- switch.control:
id: the_switch
state: !lambda return (1 > 2);