The current approach yields errors on startup if autolock times have already been set, because the service_template evaluates to an empty string.
But it also simply fails to work properly. For some reason (on my system) newly defined input_text entities start with a value of 'unknown'. LLooking into it more, it looks like this is intentional, as it is explicitly tested for in the unit tests.
To fix this, I unconditionally set these input_texts on startup, but conditionally choose the value. If it is not 'unknown' or the empty string, set it to its own current value, otherwise set the default.
Lastly, I've added an id to the automation, so it can be viewed in the tracer properly.
Type of change
[ ] Dependency upgrade
[X] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (which adds functionality)
[ ] Breaking change (fix/feature causing existing functionality to break)
[ ] Code quality improvements to existing code or addition of tests
Proposed change
The current approach yields errors on startup if autolock times have already been set, because the service_template evaluates to an empty string.
But it also simply fails to work properly. For some reason (on my system) newly defined input_text entities start with a value of 'unknown'. LLooking into it more, it looks like this is intentional, as it is explicitly tested for in the unit tests.
To fix this, I unconditionally set these input_texts on startup, but conditionally choose the value. If it is not 'unknown' or the empty string, set it to its own current value, otherwise set the default.
Lastly, I've added an id to the automation, so it can be viewed in the tracer properly.
Type of change