Templated gate beacon on_press and on_release
Some checks failed
CI / YAML lint (push) Has been cancelled
CI / ESPHome config validation (push) Has been cancelled

This commit is contained in:
2026-02-19 14:23:27 +01:00
parent 2ef5945c9f
commit a966f6adb4
3 changed files with 32 additions and 88 deletions

View File

@@ -0,0 +1,9 @@
- if:
condition:
and:
- switch.is_on: ${enable_id}
- switch.is_on: auto_close
- lambda: 'return id(beacon_count) == 1;'
then:
- button.press: gate_close
- lambda: 'id(beacon_count) -= 1;'

View File

@@ -0,0 +1,9 @@
- lambda: 'id(beacon_count) += 1;'
- if:
condition:
and:
- switch.is_on: ${enable_id}
- switch.is_on: auto_open
- lambda: 'return id(beacon_count) == 1;'
then:
- button.press: gate_open