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 ... ]