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
850 stars 251 forks source link

Bug - Hook light using light color mode while set to none #383

Open TFhdKi95ae8L opened 2 years ago

TFhdKi95ae8L commented 2 years ago

Blueprint name

Hook - light

Home Assistant Core Version

2022.7.7

Home Assistant Installation Type

Home Assistant Operating System

Description

Using an IKEA E2002 for dimmable only light group via Z2M. Set light color mode to none, to be able to use left and right buttons for other purposes. While long pressing right or left button, the light group does switch on though. All other possible presses on left or right do not control the light group (as intended)

Automation YAML config

alias: Controller - IKEA E2001/E2002 STYRBAR Remote control
description: ''
use_blueprint:
  path: EPMatt/ikea_e2001_e2002.yaml
  input:
    integration: Zigbee2MQTT
    controller_entity: sensor.ikea_dimmer_knop_action
    helper_last_controller_event: input_text.ikeadimmerhelper
    action_button_up_short: []
    action_button_down_short: []
    action_button_up_long: []
    action_button_left_short:
      - service: cover.close_cover
        data: {}
        target:
          device_id: 748ebcb73cb88cfecc6853d6529cf996
    action_button_left_double:
      - service: cover.open_cover
        data: {}
        target:
          device_id: 748ebcb73cb88cfecc6853d6529cf996
    button_left_double_press: true
    button_right_double_press: true
    action_button_right_short:
      - service: media_player.toggle
        data: {}
        target:
          device_id: 89a0e0185fb71730ecbc496e26540f82
    action_button_right_long:
      - service: script.netflix
        data: {}
    action_button_right_double:
      - service: script.youtube
        data: {}

alias: Hook - Light
description: ''
use_blueprint:
  path: EPMatt/light.yaml
  input:
    controller_device: 4a99f5edc69f7ad59a2fc63f4391edf4
    controller_model: IKEA E2001/E2002 STYRBAR Remote control
    controller_entity: sensor.ikea_dimmer_knop_action
    light_color_mode: None
    light: light.woonkamer

To Reproduce

Use left or right button long press on Styrbar E2002 with Controller - IKEA E2001/E2002 STYRBAR Remote control and Hook - Light with color mode set to none.

Expected behavior

No action on light with color mode to none and using long press left and / or right buttons

Actual Behaviour

Switching of light with left or right long press

Additional Details

Screenshots

No response

Additional context

Executed: 3 August 2022 at 10:42:13 Result: params: domain: light service: turn_on service_data: transition: 0.25 entity_id:

TFhdKi95ae8L commented 2 years ago

https://github.com/EPMatt/awesome-ha-blueprints/blob/a2756dca595e88e5ab26cfbd649747420ea42a03/blueprints/hooks/light/light.yaml#L516 https://github.com/EPMatt/awesome-ha-blueprints/blob/a2756dca595e88e5ab26cfbd649747420ea42a03/blueprints/hooks/light/light.yaml#L533 https://github.com/EPMatt/awesome-ha-blueprints/blob/a2756dca595e88e5ab26cfbd649747420ea42a03/blueprints/hooks/light/light.yaml#L550 https://github.com/EPMatt/awesome-ha-blueprints/blob/a2756dca595e88e5ab26cfbd649747420ea42a03/blueprints/hooks/light/light.yaml#L577

I think these lines of code are responsible for the color modes. I do not see any difference in the logic of short vs long presses. If I can deliver any logs, please inform me on which info would be needed.

TFhdKi95ae8L commented 2 years ago

Might be related to the following Zigbee2MQTT E2002 remote issue: https://github.com/Koenkk/zigbee2mqtt/issues/13335