Sian-Lee-SA / Home-Assistant-Switch-Manager

Switch manager is a centralised component to handle button pushes for your wireless switches. This includes anything passed through the event bus. The component relies on switch blueprints which is easily made to allow GUI configuration of your switches and their button pushes. This helps remove clutter from the automations.
Other
222 stars 84 forks source link

Ikea Strybar brightness_stop_up / brightness_stop_down no more available #248

Closed b2un0 closed 2 weeks ago

b2un0 commented 3 weeks ago

with the latest firmware 2.4.16 for the Ikea E2001/E2002 the are brightness_stop_up /andbrightness_stop_down actions are nor more available

this also documented here: https://www.zigbee2mqtt.io/devices/E2001_E2002.html

z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Büro Remote/action', payload 'brightness_move_down'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Büro Remote/action', payload 'brightness_stop'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Büro Remote/action', payload 'brightness_move_up'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Büro Remote/action', payload 'brightness_stop'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Büro Remote/action', payload 'arrow_left_hold'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Büro Remote/action', payload 'arrow_left_release'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Büro Remote/action', payload 'arrow_right_hold'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Büro Remote/action', payload 'arrow_right_release'

affected:

https://github.com/Sian-Lee-SA/Home-Assistant-Switch-Manager/blob/f54a72355c45d3fba96f266d62e5be674af8899b/custom_components/switch_manager/blueprints/zigbee2mqtt-ikea-styrbar.yaml#L22

https://github.com/Sian-Lee-SA/Home-Assistant-Switch-Manager/blob/f54a72355c45d3fba96f266d62e5be674af8899b/custom_components/switch_manager/blueprints/zigbee2mqtt-ikea-styrbar.yaml#L54

b2un0 commented 3 weeks ago

The Ikea RODRET (E2201) with Firmware 1.0.57 is also affected.

z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Ikea E2201/action', payload 'off'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Ikea E2201/action', payload 'on'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Ikea E2201/action', payload 'brightness_move_down'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Ikea E2201/action', payload 'brightness_stop'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Ikea E2201/action', payload 'brightness_move_up'
z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Ikea E2201/action', payload 'brightness_stop'

https://github.com/Sian-Lee-SA/Home-Assistant-Switch-Manager/blob/f54a72355c45d3fba96f266d62e5be674af8899b/custom_components/switch_manager/blueprints/zigbee2mqtt-ikea-e2201.yaml#L21

https://github.com/Sian-Lee-SA/Home-Assistant-Switch-Manager/blob/f54a72355c45d3fba96f266d62e5be674af8899b/custom_components/switch_manager/blueprints/zigbee2mqtt-ikea-e2201.yaml#L37

b2un0 commented 3 weeks ago

relates to https://github.com/Koenkk/zigbee2mqtt/discussions/23668

b2un0 commented 2 weeks ago

ups, looks like a duplicate to #214

Sian-Lee-SA commented 2 weeks ago

I will update the styrbar as I am the author but someone who owns the RODRET or the author of that blueprint will need to update it. Must say it is a bit annoying when they make these small changes.

b2un0 commented 2 weeks ago

for testing purpose i edited the blueprint on my HA Instance and only changed the brightness_stop_down to brightness_stop.

i restarted home assistant after that.

in the debug console, every press creates a incoming and action_triggered event. but the brightness_stoponly has the incoming event, no action_triggered :( image

image

is there any caching of the blueprints?

b2un0 commented 2 weeks ago

exactly the same behavior for RODRET / E2201 :(

Sian-Lee-SA commented 2 weeks ago

Did you change it in \home-assistant\config\blueprints\switch_manager path and not the component path?

EDIT: just noticed the question about caching... The files from the component are copied over to the blueprints/switch_manager path.

Sian-Lee-SA commented 2 weeks ago

Also the issue with this recent change (whether it's because of Ikea *my money is on them or Z2M), it will mean that both buttons are always going to execute their actions on released. You will need to add some logic and check if hold for either button was pushed last to differentiate which one to act on.

b2un0 commented 2 weeks ago

gnah, thanks.

i edited the blueprint in the component path -.-

now it works :)

image

Sian-Lee-SA commented 2 weeks ago

Cool, I've pushed the changes so should also be in next release. But again, that's only for Styrbar, will wait for someone to do the Rodret

b2un0 commented 2 weeks ago

Also the issue with this recent change (whether it's because of Ikea *my money is on them or Z2M), it will mean that both buttons are always going to execute their actions on released. You will need to add some logic and check if hold for either button was pushed last to differentiate which one to act on.

yes, i know. i have already a workaround for this.

i created a boolean helper for each ikea remote i have and created a while condition:

hold_up image

hold_up AND hold_down released: image

b2un0 commented 2 weeks ago

PR #250 for Rodret created

b2un0 commented 2 weeks ago

and for copy paste:

hold

- data: {}
  target:
    entity_id: input_boolean.buro_remote_state_helper
  service: input_boolean.turn_on
- repeat:
    while:
      - condition: state
        entity_id: input_boolean.buro_remote_state_helper
        state: "on"
    sequence:
      - data:
          brightness_step_pct: 10
        target:
          entity_id: light.buro
        action: light.turn_on
      - delay:
          hours: 0
          minutes: 0
          seconds: 1
          milliseconds: 0
  enabled: true

hold released

- data: {}
  target:
    entity_id: input_boolean.buro_remote_state_helper
  service: input_boolean.turn_off