mirror of
https://github.com/esphome/esphome.git
synced 2026-09-29 07:50:21 +00:00
[text_sensor] Use register_apply_action for text_sensor.template.publish (#19539)
This commit is contained in:
@@ -77,3 +77,14 @@ text_sensor:
|
||||
return {x.substr(0, 10) + "..."};
|
||||
}
|
||||
return {x};
|
||||
|
||||
- platform: template
|
||||
name: "Test Publish Action"
|
||||
id: test_publish_action
|
||||
on_value:
|
||||
- text_sensor.template.publish:
|
||||
id: test_map_single
|
||||
state: "ON"
|
||||
- text_sensor.template.publish:
|
||||
id: test_map_single
|
||||
state: !lambda 'return x + " again";'
|
||||
|
||||
Reference in New Issue
Block a user