You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Controller - IKEA E2001/E2002 STYRBAR Remote control
Home Assistant Core Version
2024.8.1
Home Assistant Installation Type
Home Assistant Core
Description
The variable last_controller_event is only filled if the helper_last_controller_event matches the regex "^{(("a": ".*"|"t": \d+.\d+)(,)?){2}}$". This requires that the "a" and "t" keys are separated by a comma AND a blank.
But the input_text is built as {"a":trigger_action,"t":as_timestamp(now())} with only a separating comma and no blank. Also after the colon a blank is expected which is not there. This means that the variable last_controller_event is never filled.
The correct code line should be:
last_controller_event: '{{ (states(helper_last_controller_event) | from_json).a
if helper_last_controller_event is not none and (states(helper_last_controller_event)
| regex_match("^\{((\"a\":\".*\"|\"t\":\d+\.\d+)(,)?){2}\}$")) else "" }}'
So (, ) is changed to (,) and the blank after the colon is removed.
Automation YAML config
none
To Reproduce
Go to '...'
Click on '....'
Trigger the automation '....'
See error
Expected behavior
none
Actual Behaviour
none
Additional Details
I'd like to help developing a fix for this issue.
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
I can confirm this bug.
Need to replace regex_match("^\{((\"a\": \".*\"|\"t\": \d+\.\d+)(, )?){2}\}$")
to regex_match("^\{((\"a\":\".*\"|\"t\":\d+\.\d+)(,)?){2}\}$")
Blueprint name
Controller - IKEA E2001/E2002 STYRBAR Remote control
Home Assistant Core Version
2024.8.1
Home Assistant Installation Type
Home Assistant Core
Description
The variable last_controller_event is only filled if the helper_last_controller_event matches the regex "^{(("a": ".*"|"t": \d+.\d+)(,)?){2}}$". This requires that the "a" and "t" keys are separated by a comma AND a blank.
But the input_text is built as {"a":trigger_action,"t":as_timestamp(now())} with only a separating comma and no blank. Also after the colon a blank is expected which is not there. This means that the variable last_controller_event is never filled.
The correct code line should be:
last_controller_event: '{{ (states(helper_last_controller_event) | from_json).a
So (, ) is changed to (,) and the blank after the colon is removed.
Automation YAML config
none
To Reproduce
Expected behavior
none
Actual Behaviour
none
Additional Details
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: