Error in Evaluation of condition of state attribute #16071
Unanswered
riegera2412
asked this question in
Automations / scripts / scenes
Replies: 1 comment
-
I don't think you did anything wrong, this issue comes up somewhat frequently. The problem is that state trigger is primarily designed to work with states, which are always strings. So it assumes anything entered into the textbox is a string. However when an attribute is selected, attributes don't have that same restriction that must always be strings. So when you enter 17 in the box, the UI editor has no way to know if you mean "17" or 17, so you have to edit the yaml to make it specific. It would be nice to have this addressed, though I'm not sure of the best way that could be done. But you're not alone in making this error. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there,
not exactly sure if this is an error, a bug or a wanted behavior. Also not sure about this being the correct place for this discussion topic.
I realized this happening after I got a 15 Minute block from Homematic IP for to many requests.
I run HA OS 9.5 on a HP T620 that is up to date with all addons, HA core, supervisor etc.
I have several automations on a 5 min time based trigger that will set the desired room temperature to a value of 17C when I am not at home and the temperature isnt already set to 17C. After checking the climate entity which holds this value as a state attribute, I realized that it is set to 17C, but the automation still ran through, because the condition was evaluated as false, which seemed odd to me.
I just realized this now due to the temporary block but have the automations set up for 10 days now without any issue.
When checking the log in "traces" I saw, that the condition was set to 17 and the state was read as '17', which was considered false.
Next I went to the automations GUI and opened the conditions as yaml, where the desired condition was set to "17". I changed this to 17 without the " and now the automations seem to work as intended without causing the eval of the condition to false.
Since I set up the automations via the GUI there seems to be either something wrong with the "translation" to the automations.yaml or I did something wrong when setting up the automation via the GUI.
I appreciate any insights one of you might have. Maybe I made an error while setting up the automations. If I understand what I did wrong I can prevent this from happening in the future. Especially since I like to avoid a permanent Block on HMPI.
Thanks in adavance,
A.
Beta Was this translation helpful? Give feedback.
All reactions