mirror of
https://github.com/esphome/esphome.git
synced 2025-09-01 19:02:18 +01:00
Add select entities and implement template select (#2067)
Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
@@ -82,6 +82,29 @@ number:
|
||||
min_value: 0
|
||||
step: 5
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
name: My template select
|
||||
id: template_select_id
|
||||
optimistic: true
|
||||
initial_option: two
|
||||
restore_value: true
|
||||
on_value:
|
||||
- logger.log:
|
||||
format: "Select changed to %s"
|
||||
args: ["x.c_str()"]
|
||||
set_action:
|
||||
- logger.log:
|
||||
format: "Template Select set to %s"
|
||||
args: ["x.c_str()"]
|
||||
- select.set:
|
||||
id: template_select_id
|
||||
option: two
|
||||
options:
|
||||
- one
|
||||
- two
|
||||
- three
|
||||
|
||||
sensor:
|
||||
- platform: selec_meter
|
||||
total_active_energy:
|
||||
|
Reference in New Issue
Block a user