EPMatt / awesome-ha-blueprints

A curated collection of automation blueprints for Home Assistant.
https://epmatt.github.io/awesome-ha-blueprints
GNU General Public License v3.0
834 stars 250 forks source link

Bug - Hook - Lights Automation loops thousands of times when used with E1743 and LED1836G9 bulb #557

Open mark1foley opened 1 year ago

mark1foley commented 1 year ago

Blueprint name

Hook - Light

Home Assistant Core Version

2023.7.2

Home Assistant Installation Type

Home Assistant Operating System

Description

I recently purchase some Ikea 1743 switches and LED1836G9 bulbs. I used the "Controller - IKEA E1743 TRÅDFRI On/Off Switch & Dimmer" blueprint (thank you!) and created automations to turn the bulbs on and off using the switch that work great.

I then used the "Hook - Light" blueprint to create automations to adjust the brightness with a long press. However, when using a long press (either up or down) the automation seems to loop endlessly (or at least for several minutes). The bulb brightness goes for the lowest to the highest value (or vice versa for a long down press).

I increased the "Light brightness steps - long actions" option to 100 and, although it reduced change in brightness for each step it still has the same result. I even tried disabling the "Up button long press - loop until release" option in the 1743 automation but the problem persisted. Also, the traces for the Hook automation show them running for several minutes. I have 3 pairs of switches and bulbs and they all experience the same issue.

I'm presume it's something I done but can't work out what.

Automation YAML config

alias: Mqtt-SpareBedroomLampLeft
description: ""
use_blueprint:
  path: EPMatt/ikea_e1743.yaml
  input:
    integration: Zigbee2MQTT
    controller_entity: sensor.sw_dim_spare_bedroom_lamp1_action
    helper_last_controller_event: input_text.sw_dim_spare_bedroom_lamp1_action
    action_button_up_short:
      - service: switch.turn_on
        data: {}
        target:
          entity_id: switch.sw_pwr_4gn_spare_bedroom1_p2
    action_button_down_short:
      - service: switch.turn_off
        data: {}
        target:
          entity_id: switch.sw_pwr_4gn_spare_bedroom1_p2
    button_up_long_loop: false
    button_down_long_loop: false
    button_up_long_max_loop_repeats: 5
    button_down_long_max_loop_repeats: 5

To Reproduce

  1. Do long press, either up or down, on switch.

Expected behavior

Brightness steps should stop when button is released

Actual Behaviour

Automation runs after the button is released, even when looping is disabled.

Additional Details

Screenshots

image

image

image

Zigbee2MQTT - Work - Microsoft​ Edge 2023-07-16 10-40-13.zip

Additional context

No response

jeroen85 commented 1 year ago

Having the same issue since a few weeks. Previously it worked ok. Did not update the blueprint. Expect it to be related to z2m or HA. Need to investigate as soon as I have some more time

jeroen85 commented 1 year ago

Fixed mine; have a look at this; https://github.com/EPMatt/awesome-ha-blueprints/pull/545

mark1foley commented 1 year ago

Thanks @jeroen85 !!! #545 worked for me as well