Skip to content

Commit

Permalink
Merge commit 'refs/pull/551/head' of https://github.com/EPMatt/awesom…
Browse files Browse the repository at this point in the history
…e-ha-blueprints into ikea_updates

Merged EPMatt#551
  • Loading branch information
xitation committed Nov 9, 2023
2 parents b3a23f0 + 40c37aa commit 9eb5c92
Show file tree
Hide file tree
Showing 47 changed files with 4,737 additions and 16,396 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '16'
- name: Cache node modules
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.6
env:
cache-name: cache-node-modules
with:
Expand Down Expand Up @@ -62,9 +62,9 @@ jobs:
- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '16'
- name: Cache node modules
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.6
env:
cache-name: cache-node-modules
with:
Expand Down Expand Up @@ -101,9 +101,9 @@ jobs:
- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '16'
- name: Cache node modules
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.6
env:
cache-name: cache-node-modules
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '16'
- name: Cache node modules
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.6
env:
cache-name: cache-node-modules
with:
Expand Down Expand Up @@ -75,9 +75,9 @@ jobs:
- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '16'
- name: Cache node modules
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.6
env:
cache-name: cache-node-modules
with:
Expand Down Expand Up @@ -119,9 +119,9 @@ jobs:
- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '16'
- name: Cache node modules
uses: actions/cache@v3.0.2
uses: actions/cache@v3.0.6
env:
cache-name: cache-node-modules
with:
Expand Down
34 changes: 17 additions & 17 deletions blueprints/controllers/ikea_e1524_e1810/ikea_e1524_e1810.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ blueprint:
🚀 This blueprint is part of the **[Awesome HA Blueprints](https://epmatt.github.io/awesome-ha-blueprints) project**.
ℹ️ Version 2021.10.26
ℹ️ Version 2022.08.08
source_url: https://github.com/EPMatt/awesome-ha-blueprints/blob/main/blueprints/controllers/ikea_e1524_e1810/ikea_e1524_e1810.yaml
domain: automation
input:
Expand Down Expand Up @@ -340,13 +340,13 @@ variables:
button_left_release: [release, release_4289]
button_right_short: [press_256_13_0]
button_right_long: [hold_3328_0]
button_right_release: [release, release_1605]
button_up_short: [step_with_on_off_0_43_5, step_with_on_off_StepMode.Up_43_5]
button_up_long: [move_with_on_off_0_83, move_with_on_off_0_84, move_with_on_off_MoveMode.Up_84]
button_up_release: [stop, stop_with_on_off]
button_down_short: [step_1_43_5, step_StepMode.Down_43_5_bitmap8.0_bitmap8.0]
button_down_long: [move_1_83, move_1_84, move_MoveMode.Down_84_bitmap8.0_bitmap8.0]
button_down_release: [stop, stop_bitmap8.0_bitmap8.0]
button_right_release: [release]
button_up_short: [step_with_on_off_StepMode.Up_43_5]
button_up_long: [move_with_on_off_0_83, move_with_on_off_0_84]
button_up_release: [stop]
button_down_short: [step_StepMode.Down_43_5_0_0]
button_down_long: [move_1_83, move_1_84]
button_down_release: [stop]
button_center_short: [toggle]
button_center_long: [press_2_0_0]
zigbee2mqtt:
Expand Down Expand Up @@ -380,7 +380,7 @@ variables:
button_down_release: '{{ actions_mapping[integration_id]["button_down_release"] }}'
button_center_short: '{{ actions_mapping[integration_id]["button_center_short"] }}'
button_center_long: '{{ actions_mapping[integration_id]["button_center_long"] }}'
# integrations which need to store the previous long press event to determine which button was released
# integrations which need to store the previous press event to determine which button was released
integrations_with_prev_event_storage: [zha]
# build data to send within a controller event
controller_entity: !input controller_entity
Expand Down Expand Up @@ -436,13 +436,13 @@ 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()) - as_timestamp((states(helper_last_controller_event) | from_json).last_triggered if helper_last_controller_event is not none and (states(helper_last_controller_event) | regex_match("^\{(\".*\": \".*\"(, )?)*\}$")) else "1970-01-01 00:00:00")) * 1000 }}'
last_controller_event: '{{ (states(helper_last_controller_event) | from_json).trigger_action if helper_last_controller_event is not none and (states(helper_last_controller_event) | regex_match("^\{(\".*\": \".*\"(, )?)*\}$")) 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:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":trigger_action,"last_triggered":now()|string} | to_json }}'
value: '{{ {"a":trigger_action,"t":as_timestamp(now())} | to_json }}'
# choose the sequence to run based on the received button event
- choose:
- conditions: '{{ trigger_action | string in button_left_short }}'
Expand All @@ -459,7 +459,7 @@ action:
- service: input_text.set_value
data:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":"double_press","last_triggered":now() | string} | to_json }}'
value: '{{ {"a":"double_press","t":as_timestamp(now())} | to_json }}'
# run the double press action
# fire the event
- event: ahb_controller_event
Expand Down Expand Up @@ -542,7 +542,7 @@ action:
- service: input_text.set_value
data:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":"double_press","last_triggered":now() | string} | to_json }}'
value: '{{ {"a":"double_press","t":as_timestamp(now())} | to_json }}'
# run the double press action
# fire the event
- event: ahb_controller_event
Expand Down Expand Up @@ -625,7 +625,7 @@ action:
- service: input_text.set_value
data:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":"double_press","last_triggered":now() | string} | to_json }}'
value: '{{ {"a":"double_press","t":as_timestamp(now())} | to_json }}'
# run the double press action
# fire the event
- event: ahb_controller_event
Expand Down Expand Up @@ -708,7 +708,7 @@ action:
- service: input_text.set_value
data:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":"double_press","last_triggered":now() | string} | to_json }}'
value: '{{ {"a":"double_press","t":as_timestamp(now())} | to_json }}'
# run the double press action
# fire the event
- event: ahb_controller_event
Expand Down Expand Up @@ -791,7 +791,7 @@ action:
- service: input_text.set_value
data:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":"double_press","last_triggered":now() | string} | to_json }}'
value: '{{ {"a":"double_press","t":as_timestamp(now())} | to_json }}'
# run the double press action
# fire the event
- event: ahb_controller_event
Expand Down
14 changes: 7 additions & 7 deletions blueprints/controllers/ikea_e1743/ikea_e1743.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ blueprint:
🚀 This blueprint is part of the **[Awesome HA Blueprints](https://epmatt.github.io/awesome-ha-blueprints) project**.
ℹ️ Version 2021.10.26
ℹ️ Version 2022.08.08
source_url: https://github.com/EPMatt/awesome-ha-blueprints/blob/main/blueprints/controllers/ikea_e1743/ikea_e1743.yaml
domain: automation
input:
Expand Down Expand Up @@ -221,7 +221,7 @@ variables:
button_down_short: '{{ actions_mapping[integration_id]["button_down_short"] }}'
button_down_long: '{{ actions_mapping[integration_id]["button_down_long"] }}'
button_down_release: '{{ actions_mapping[integration_id]["button_down_release"] }}'
# integrations which need to store the previous long press event to determine which button was released
# integrations which need to store the previous press event to determine which button was released
integrations_with_prev_event_storage: [zha, zigbee2mqtt]
# build data to send within a controller event
controller_entity: !input controller_entity
Expand Down Expand Up @@ -277,13 +277,13 @@ 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()) - as_timestamp((states(helper_last_controller_event) | from_json).last_triggered if helper_last_controller_event is not none and (states(helper_last_controller_event) | regex_match("^\{(\".*\": \".*\"(, )?)*\}$")) else "1970-01-01 00:00:00")) * 1000 }}'
last_controller_event: '{{ (states(helper_last_controller_event) | from_json).trigger_action if helper_last_controller_event is not none and (states(helper_last_controller_event) | regex_match("^\{(\".*\": \".*\"(, )?)*\}$")) 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:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":trigger_action,"last_triggered":now()|string} | to_json }}'
value: '{{ {"a":trigger_action,"t":as_timestamp(now())} | to_json }}'
# choose the sequence to run based on the received button event
- choose:
- conditions: '{{ trigger_action | string in button_up_short }}'
Expand All @@ -300,7 +300,7 @@ action:
- service: input_text.set_value
data:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":"double_press","last_triggered":now() | string} | to_json }}'
value: '{{ {"a":"double_press","t":as_timestamp(now())} | to_json }}'
# run the double press action
# fire the event
- event: ahb_controller_event
Expand Down Expand Up @@ -383,7 +383,7 @@ action:
- service: input_text.set_value
data:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":"double_press","last_triggered":now() | string} | to_json }}'
value: '{{ {"a":"double_press","t":as_timestamp(now())} | to_json }}'
# run the double press action
# fire the event
- event: ahb_controller_event
Expand Down
8 changes: 4 additions & 4 deletions blueprints/controllers/ikea_e1744/ikea_e1744.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ blueprint:
🚀 This blueprint is part of the **[Awesome HA Blueprints](https://epmatt.github.io/awesome-ha-blueprints) project**.
ℹ️ Version 2021.10.26
ℹ️ Version 2022.08.08
source_url: https://github.com/EPMatt/awesome-ha-blueprints/blob/main/blueprints/controllers/ikea_e1744/ikea_e1744.yaml
domain: automation
input:
Expand Down Expand Up @@ -239,13 +239,13 @@ 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()) - as_timestamp((states(helper_last_controller_event) | from_json).last_triggered if helper_last_controller_event is not none and (states(helper_last_controller_event) | regex_match("^\{(\".*\": \".*\"(, )?)*\}$")) else "1970-01-01 00:00:00")) * 1000 }}'
last_controller_event: '{{ (states(helper_last_controller_event) | from_json).trigger_action if helper_last_controller_event is not none and (states(helper_last_controller_event) | regex_match("^\{(\".*\": \".*\"(, )?)*\}$")) 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:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":trigger_action,"last_triggered":now()|string} | to_json }}'
value: '{{ {"a":trigger_action,"t":as_timestamp(now())} | to_json }}'
# choose the sequence to run based on the received button event
- choose:
- conditions: '{{ trigger_action | string in rotate_left }}'
Expand Down
12 changes: 6 additions & 6 deletions blueprints/controllers/ikea_e1766/ikea_e1766.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ blueprint:
🚀 This blueprint is part of the **[Awesome HA Blueprints](https://epmatt.github.io/awesome-ha-blueprints) project**.
ℹ️ Version 2021.10.29
ℹ️ Version 2022.08.08
source_url: https://github.com/EPMatt/awesome-ha-blueprints/blob/main/blueprints/controllers/ikea_e1766/ikea_e1766.yaml
domain: automation
input:
Expand Down Expand Up @@ -216,13 +216,13 @@ 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()) - as_timestamp((states(helper_last_controller_event) | from_json).last_triggered if helper_last_controller_event is not none and (states(helper_last_controller_event) | regex_match("^\{(\".*\": \".*\"(, )?)*\}$")) else "1970-01-01 00:00:00")) * 1000 }}'
last_controller_event: '{{ (states(helper_last_controller_event) | from_json).trigger_action if helper_last_controller_event is not none and (states(helper_last_controller_event) | regex_match("^\{(\".*\": \".*\"(, )?)*\}$")) 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:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":trigger_action,"last_triggered":now()|string} | to_json }}'
value: '{{ {"a":trigger_action,"t":as_timestamp(now())} | to_json }}'
# choose the sequence to run based on the received button event
- choose:
- conditions: '{{ trigger_action | string in button_up_short }}'
Expand All @@ -239,7 +239,7 @@ action:
- service: input_text.set_value
data:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":"double_press","last_triggered":now() | string} | to_json }}'
value: '{{ {"a":"double_press","t":as_timestamp(now())} | to_json }}'
# run the double press action
# fire the event
- event: ahb_controller_event
Expand Down Expand Up @@ -306,7 +306,7 @@ action:
- service: input_text.set_value
data:
entity_id: !input helper_last_controller_event
value: '{{ {"trigger_action":"double_press","last_triggered":now() | string} | to_json }}'
value: '{{ {"a":"double_press","t":as_timestamp(now())} | to_json }}'
# run the double press action
# fire the event
- event: ahb_controller_event
Expand Down
Loading

0 comments on commit 9eb5c92

Please sign in to comment.