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

Bug - IKEA E1743 trigger action not matching action_mappings [zha] #571

Open
1 task
beautiful-orca opened this issue Oct 26, 2023 · 2 comments
Open
1 task
Labels
blueprint An issue related to a blueprint bug Something isn't working

Comments

@beautiful-orca
Copy link

Blueprint name

ikea_e1743.yaml

Home Assistant Core Version

2023.10.5

Home Assistant Installation Type

Home Assistant Operating System

Description

Actions are not fired because trigger_action does not match actions_mapping

zha
usb-Texas_Instruments_TI_CC2531
zigpy-znp

TRADFRI on/off switchby IKEA of Sweden
Zigbee info
Quirk: zhaquirks.ikea.twobtnremote.IkeaTradfriRemote2Btn

sw_build_id: 24.4.6
Should be the latest version:
https://ww8.ikea.com/ikeahomesmart/releasenotes/releasenotes.html
And I have ZHA OTA updates enabled

Automation YAML config

alias: Controller - IKEA E1743 TRÅDFRI On/Off Switch & Dimmer
description: ""
use_blueprint:
  path: EPMatt/ikea_e1743.yaml
  input:
    integration: ZHA
    controller_device: 32a1983edde5994acc4f75405484ddfb
    helper_last_controller_event: input_text.on_off_button_state
    action_button_up_long:
      - service: persistent_notification.create
        data:
          message: up long
    action_button_up_release:
      - service: persistent_notification.create
        data:
          message: up release
    action_button_up_short:
      - service: persistent_notification.create
        data:
          message: up short
    action_button_up_double:
      - service: persistent_notification.create
        data:
          message: up double
    action_button_down_short:
      - service: persistent_notification.create
        data:
          message: down short
    action_button_down_long:
      - service: persistent_notification.create
        data:
          message: down long
    action_button_down_release:
      - service: persistent_notification.create
        data:
          message: down release
    action_button_down_double:
      - service: persistent_notification.create
        data:
          message: down double
    button_up_long_loop: true
    button_down_long_loop: true
    button_down_long_max_loop_repeats: 5
    button_up_long_max_loop_repeats: 5
    button_up_double_press: true
    button_down_double_press: true

To Reproduce

Use Blueprint as Automation which fires notifications based on button actions
eg. long press up button on E1743 button and release after about 2 seconds

Expected behavior

Run Action for long press (Notification: "up long")

Actual Behaviour

Trigger_action I get from text helper:

move_with_on_off_MoveMode.Up_83
stop_with_on_off
move_MoveMode.Down_83_0_0
stop_with_on_off

But actions_mapping for zha is:

button_up_long: [move_with_on_off_0_83]
button_up_release: [stop]
button_down_long: [move_1_83]
button_down_release: [stop]

- conditions: '{{ trigger_action | string in button_up_long }}'

So it compares trigger action with actions_mapping but they don't match because the trigger action somehow reads "MoveMode.Up" from the zha_event (trigger.event.data.args) instead of "0"
"move_with_on_off_MoveMode.Up_83" | "move_with_on_off_0_83"

zha events:

event_type: zha_event
data:
  device_ieee: 00:3c:84:ff:fe:1b:70:f5
  unique_id: 00:3c:84:ff:fe:1b:70:f5:1:0x0008
  device_id: 32a1983edde5994acc4f75405484ddfb
  endpoint_id: 1
  cluster_id: 8
  command: move_with_on_off
  args:
    - 0
    - 83
  params:
    move_mode: 0
    rate: 83
origin: LOCAL
time_fired: "2023-10-26T03:49:59.481286+00:00"
context:
  id: 01HDN1MW1SG5DJ42H3ZP6SA2HG
  parent_id: null
  user_id: null


event_type: zha_event
data:
  device_ieee: 00:3c:84:ff:fe:1b:70:f5
  unique_id: 00:3c:84:ff:fe:1b:70:f5:1:0x0008
  device_id: 32a1983edde5994acc4f75405484ddfb
  endpoint_id: 1
  cluster_id: 8
  command: move
  args:
    - 1
    - 83
    - 0
    - 0
  params:
    move_mode: 1
    rate: 83
    options_mask: 0
    options_override: 0
origin: LOCAL
time_fired: "2023-10-26T03:50:02.222456+00:00"
context:
  id: 01HDN1MYQE1144G9FXG0MS1GXC
  parent_id: null
  user_id: null


event_type: zha_event
data:
  device_ieee: 00:3c:84:ff:fe:1b:70:f5
  unique_id: 00:3c:84:ff:fe:1b:70:f5:1:0x0008
  device_id: 32a1983edde5994acc4f75405484ddfb
  endpoint_id: 1
  cluster_id: 8
  command: stop_with_on_off
  args: []
  params: {}
origin: LOCAL
time_fired: "2023-10-26T03:50:02.552566+00:00"
context:
  id: 01HDN1MZ1RS6QW7CF5AH0D7KXD
  parent_id: null
  user_id: null

Additional Details

  • I'd like to help developing a fix for this issue.

Screenshots

No response

Additional context

No response

@beautiful-orca beautiful-orca added blueprint An issue related to a blueprint bug Something isn't working labels Oct 26, 2023
@oleost
Copy link

oleost commented Oct 27, 2023

Is this maybe the reason I cannot get the dimming to work? I tried to different approaches now.

Failing to dim3
Failing to dim2
Failing to dim

@napalmz
Copy link

napalmz commented Dec 1, 2023

I've the same problem, it started when I moved from DECONZ to ZHA.
No way to dim light now.

EDIT: There are numerous PULL REQUESTS to fix this problem but I see that no changes have been made to the blueprints for more than a year. I'll try to point to one of these forks and see if I fix it, although it should be handled here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blueprint An issue related to a blueprint bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants