Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed regex to make double tap work again on HA 5.x #550

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
changed regex to make double tap work again on HA 5.x
After updating HA from 4.6 to 5.x double tap stopped working. Commiting this change as some did in other pull requests for the other Tradri models. Double tap is working again with these changes.
  • Loading branch information
comk22 committed May 25, 2023
commit ca448b5304788f459be470a2ef40de4e1be1c345
4 changes: 2 additions & 2 deletions blueprints/controllers/ikea_e1524_e1810/ikea_e1524_e1810.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ action:
{%- elif integration_id == "zha" -%}
{{ trigger.event.data.command }}{{"_" if trigger.event.data.args|length > 0}}{{ trigger.event.data.args|join("_") }}
{%- endif -%}
trigger_delta: '{{ (as_timestamp(now()) - ((states(helper_last_controller_event) | from_json).t if helper_last_controller_event is not none and (states(helper_last_controller_event) | regex_match("^\{((\"a\": \".*\"|\"t\": \d+\.\d+)(, )?){2}\}$")) else as_timestamp("1970-01-01 00:00:00"))) * 1000 }}'
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 "" }}'
trigger_delta: '{{ (as_timestamp(now()) - ((states(helper_last_controller_event) | from_json).t if helper_last_controller_event is not none and (states(helper_last_controller_event) | regex_match("^\{((\"a\":\".\"|\"t\":\d+\.\d+)(,)?){2}\}$")) else as_timestamp("1970-01-01 00:00:00"))) * 1000 }}'
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 "" }}'
# update helper
- service: input_text.set_value
data:
Expand Down
Loading