Open TTvanWillegen opened 1 year ago
Life saver! Had just been trying to solve this issue. I isolated it down to the delta variable and then found your open issue here.
If you use deconz, then you have no double quoted value for the "a"-key. a":2002,"t":1702413771.806498
So the right one is: regex_match("^\{((\"a\":[\"]?.*[\"]?|\"t\":\d+\.\d+)(,)?){2}\}$")
Or better: regex_match("^\{((\"a\":(\".*\"|\d+)|\"t\":\d+\.\d+)(,)?){2}\}$")
Seems exactly the same issue with IKEA E2001.
Blueprint name
EPMatt/awesome-ha-blueprints/blob/main/blueprints/controllers/philips_929002398602/philips_929002398602.yaml#L389
Home Assistant Core Version
2023.11.2
Home Assistant Installation Type
Home Assistant Operating System
Description
Hi there,
I have just re-paired all my zigbee devices via Z2M using a sonoff controller as they failed recently. However, now that it almost all works, the double press doesn't.
I've been able to trace this back to a mismatch in the regex used in the calculation of the
trigger_delta
and the value stored in thelast_action
helper fields.The regex currently is as follows: Line 389
^\{((\"a\": \".*\"|\"t\": \d+\.\d+)(, )?){2}\}$
while the helper field doesn' t contain whitespace:{"a":"off_press_release","t":1699726460.746302}
A matching regex (for me) is as follows:
^\{((\"a\": \".*\"|\"t\":\d+\.\d+)(,)?){2}\}$
This regex removes the whitespace after the semicolon in thet
part as well as after the separating comma in the center.Automation YAML config
To Reproduce
For use in Home Assistant's Developer tools:
Expected behavior
The hue switch to emulate a double press event.
Actual Behaviour
Not triggering the double press path due to a mismatching Regex.
Additional Details
Screenshots
No response
Additional context
No response