Gradually I’m going through my configuration trying to cleanup all errors and warnings in log file, that can be remediated by proper configuration. Now I faced issue that I’m not able to resolve (perhaps it is not possible
).
So, I use Twinkly integration to control my Christmas lights. Everything works fine, but I do not like how effects are handled. Currently I have input_select that stores (as options) list of effects configured on device. I can change effects from UI via this helper. It is populated at HA start with list of available options from integration. Obviously these might change over time, so selection is not fixed. And here comes the problem; when input_select is defined in configuration.yaml, it is required to provide the list of options, that I do not know upfront. Only after integration is initialised I can use automation to populate it with actual list. So at startup options list contains just one dummy option - None, that obviously is not valid one. And this is causing warning in log file:
026-01-11 16:06:07.379 WARNING (MainThread) [homeassistant.components.input_select] Current option: - None no longer valid (possible options: 0 Carnival, 1 Bright Tribe, 2 Neon, 3 Rosy Valentine, 4 Wed. Day Blues, 5 Snake, 6 Inferno)
I created additional input_text helper that holds the most recently selected option and tried to use it in template to define input_select options list, but seems options are not temptable:
input_select:
twinkly_effects:
name: Twinkly Effects
options: >-
- {{ states('input_text.twinkly_effect') }}
It throws exacly the same error at HA start. It is annoying, as it resets the selected option to the first on the list, which is not recent. Again I can add automation to use input_text to restore previously selected effect, but the ultimate goal is to get rid of warning message in log. Any advice?
