1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 00:31:58 +00:00

[select] Add condition for testing select option (#13267)

Co-authored-by: J. Nick Koston <nick+github@koston.org>
This commit is contained in:
Clyde Stubbs
2026-01-17 08:35:40 +11:00
committed by GitHub
parent a680884138
commit c5e4a60884
3 changed files with 85 additions and 2 deletions

View File

@@ -53,6 +53,17 @@ binary_sensor:
// Garage Door is closed.
return false;
}
- platform: template
id: select_binary_sensor
name: Select is one or two
condition:
any:
- select.is:
id: template_select
options: [one, two]
- select.is:
id: template_select
lambda: return current == id(template_text).state;
- platform: template
id: other_binary_sensor
name: "Garage Door Closed"
@@ -320,6 +331,7 @@ valve:
text:
- platform: template
id: template_text
name: "Template text"
optimistic: true
min_length: 0