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 longpress no longer works #312

Open
1 task done
kanflo opened this issue Apr 13, 2022 · 3 comments · May be fixed by #314
Open
1 task done

Bug - IKEA E1743 longpress no longer works #312

kanflo opened this issue Apr 13, 2022 · 3 comments · May be fixed by #314
Labels
blueprint An issue related to a blueprint bug Something isn't working

Comments

@kanflo
Copy link

kanflo commented Apr 13, 2022

Blueprint name

Controller - IKEA E1743 TRÅDFRI On/Off Switch & Dimmer

Home Assistant Core Version

2022.4.3

Home Assistant Installation Type

Home Assistant Operating System

Description

Prior to 2022.3 long press on the E1743 worked like a charm using ZHA. Long press yields the following in the log:

Invalid value: {"trigger_action": "move_MoveMode.Down_83_bitmap8.0_bitmap8.0", "last_triggered": "2022-04-13 21:25:11.011648+02:00"} (length range 0 - 100)

Automation YAML config

- id: '1638911675158'
  alias: Dimmer Johans skrivbord
  description: ''
  use_blueprint:
    path: EPMatt/ikea_e1743.yaml
    input:
      integration: ZHA
      controller_device: 7373e365206f24b54f6423ab692dde58
      helper_last_controller_event: input_text.johan_skrivbord_dimmer
      action_button_up_short:
      - type: turn_on
        device_id: 5b9e9eee8d41b76735b2b02fc452e0c0
        entity_id: light.skrivbord_hoger
        domain: light
      - type: turn_on
        device_id: 1bb7f39db1216c8254014b33de543dae
        entity_id: light.skrivbord_vanster
        domain: light
      action_button_up_long:
      - device_id: 5b9e9eee8d41b76735b2b02fc452e0c0
        domain: light
        entity_id: light.skrivbord_hoger
        type: brightness_increase
      - device_id: 1bb7f39db1216c8254014b33de543dae
        domain: light
        entity_id: light.skrivbord_vanster
        type: brightness_increase
      action_button_down_short:
      - type: turn_off
        device_id: 5b9e9eee8d41b76735b2b02fc452e0c0
        entity_id: light.skrivbord_hoger
        domain: light
      - type: turn_off
        device_id: 1bb7f39db1216c8254014b33de543dae
        entity_id: light.skrivbord_vanster
        domain: light
      action_button_down_long:
      - device_id: 5b9e9eee8d41b76735b2b02fc452e0c0
        domain: light
        entity_id: light.skrivbord_hoger
        type: brightness_decrease
      - device_id: 1bb7f39db1216c8254014b33de543dae
        domain: light
        entity_id: light.skrivbord_vanster
        type: brightness_decrease
      button_up_long_loop: true
      button_up_long_max_loop_repeats: 100
      button_down_long_loop: true
      button_down_long_max_loop_repeats: 197

To Reproduce

  1. Long press up or down on the E1743

Expected behavior

The lights dimmed up or down.

Actual Behaviour

  1. Devtools / States claims the automation has run
  2. Configuration / Logs show an error setting the text input helper
  3. Light brightness did not change

Additional Details

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

Screenshots

No response

Additional context

@kanflo kanflo added blueprint An issue related to a blueprint bug Something isn't working labels Apr 13, 2022
@kanflo
Copy link
Author

kanflo commented Apr 13, 2022

Actually it seems a bit unfair to label this as a bug in this repo. The input text has a default max length of 100 bytes and this limit is two years in the making.

ZHA could be the culprit by suddenly creating longer events causing strings like this:

{"trigger_action": "move_MoveMode.Down_83_bitmap8.0_bitmap8.0", "last_triggered": "2022-04-13 22:47:23.227150+02:00"}

To regain dimming of lights, one first needs to bump the max length of the input texts (min might be optional):

input_text:
  johan_skrivbord_dimmer:
    name: Dimmer Johans skrivbord
    min: 0
    max: 255

Additionally, the automation needs to adapt to the new ZHA events. See #314

Side note: as 255 is the max input string length, it seems to me HASS is written in Pascal 😄

@Hedda
Copy link

Hedda commented Apr 19, 2022

FYI, for reference also see this related ZHA issue discussion for Home Assistant core -> home-assistant/core#69375

@EPMatt
Copy link
Owner

EPMatt commented May 12, 2022

Hi @kanflo,

I'm really sorry for the long delay. I didn't notice this issue and I jumped directly in the discussion in your PR.
I'll link this ticket to your Pull Request, so we can keep track of its progress as well.
For anyone jumping into this now, please check out #314; there you'll find the fix for this, and the updated blueprints, which you can download and test on your HA instance. If you still experience issues, please provide your feedback in the Pull Request.

Thank you for your work and for your patience! :)

@EPMatt EPMatt linked a pull request May 12, 2022 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

3 participants