[text_sensor] Use register_apply_condition for text_sensor.state (#19541)

This commit is contained in:
J. Nick Koston
2026-09-23 23:30:54 +00:00
committed by GitHub
parent 807556171b
commit e1126a152e
3 changed files with 19 additions and 24 deletions
+17
View File
@@ -32,6 +32,23 @@ text_sensor:
filters:
- map:
- ON -> Active
# text_sensor.state with a constant and with a lambda, inside a trigger
# whose argument is a std::string.
on_value:
- if:
condition:
text_sensor.state:
id: test_substitute_single
state: Error
then:
- logger.log: substitute reports an error
- if:
condition:
text_sensor.state:
id: test_substitute_single
state: !lambda return x;
then:
- logger.log: substitute matches the mapped value
- platform: template
name: "Test Map Multiple"