Example: How to use ESPHome Select Component

Blog: Peđina beležnica, 01.Dec.2022, 14:49

Example: How to use ESPHome Select Component

Izvor: https://pedja.supurovic.net/example-how-to-use-esphome-select-component

ESPHome Select command allows creating entity that has several optional values, allowing one of them to be selected. Unfortunately it is not well documented, so new users have hard time to make it work.
One would expect that Select component should work as simple as setting up options, and that is it. It should set status based on selection on it’s own. but it does not work that way.
After some struggle I finally got it working and here I am making note (mostly to myself) how to do it, as I am sure I would need it again.
select:   - platform: template     name: Mode     id: mode     options:      - "OFF"      - "ON"      - "AUTO" initial_option: "OFF" optimistic: true     set_action:       - logger.log:           format: "Selected option: %s"           args: ["x.c_str()"] […]
[ ... vidi ceo članak ... ] Related posts: ESPHome: Showing Project Name and Version as Text Sensors Resolving problem flashing ESPHome into Amica NodeMCU with CP2102 Enabling two color LED on Sonoff Basic R2 Smart Home Switch

Nastavak na Peđina beležnica...



Napomena: Ova vest je automatizovano (softverski) preuzeta sa sajta Peđina beležnica. Nije preneta ručno, niti proverena od strane uredništva portala "Vesti.rs", već je preneta automatski, računajući na savesnost i dobru nameru sajta Peđina beležnica. Ukoliko vest (članak) sadrži netačne navode, vređa nekog, ili krši nečija autorska prava - molimo Vas da nas o tome ODMAH obavestite obavestite kako bismo uklonili sporni sadržaj.