mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 00:10:22 +00:00
[binary_sensor] Use register_apply_action for binary_sensor.template.publish (#19506)
This commit is contained in:
@@ -37,6 +37,16 @@ binary_sensor:
|
||||
format: "New state is %s"
|
||||
args: ['x.has_value() ? ONOFF(x) : "Unknown"']
|
||||
- binary_sensor.invalidate_state: binary_sensor_some_binary_sensor
|
||||
- binary_sensor.template.publish:
|
||||
id: publish_target
|
||||
state: true
|
||||
- binary_sensor.template.publish:
|
||||
id: publish_target
|
||||
state: !lambda "return x.value_or(false);"
|
||||
|
||||
- platform: template
|
||||
id: publish_target
|
||||
name: "Publish Target"
|
||||
|
||||
# Test autorepeat with default configuration (no timings)
|
||||
- platform: template
|
||||
|
||||
Reference in New Issue
Block a user