ZHA - Lidl/Livarnolux/Tuya/Silvercrest 4 button remote

Here is the whole blueprint:

blueprint:
  source_url: https://github.com/Damian666/HomeAssistant/blob/2932abecbb73ddf09a47d1a3d8c759073b0b070f/blueprints/automation/Damian666/Lidl_4Button_Remote_Switch.yaml
  name: ZHA - Lidl 4Button Remote Switch - Test
  description: Automate your Lidl/LivarnoLux 4Button Remote Switch using ZHA events. (Test)
  domain: automation
  input:
    Lidl_4Button_Remote_switch:
      name: Lidl 4Button Remote Switch
      description: Select the Lidl 4Button Remote Switch to use
      selector:
        device:
          integration: zha
          manufacturer: _TYZB01_bngwdjsr
          model: TS1001
          multiple: false
    button_one_short_press:
      name: Single Press
      description: Action to run on button 1 single press
      default: []
      selector:
        action: {}
    button_two_short_press:
      name: Single Press
      description: Action to run on button 2 single press
      default: []
      selector:
        action: {}
    button_three_short_press:
      name: Single Press
      description: Action to run on button 3 single press
      default: []
      selector:
        action: {}
    button_three_long_press:
      name: Long Press
      description: Action to run on button 3 long press
      default: []
      selector:
        action: {}
    button_four_short_press:
      name: Single Press
      description: Action to run on button 4 single press
      default: []
      selector:
        action: {}
    button_four_long_press:
      name: Long Press
      description: Action to run on button 4 long press
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: !input 'Lidl_4Button_Remote_switch'
action:
  - variables:
      command: "{{ trigger.event.data.command }}"
      button_mode: "{{ trigger.event.data.args[0] }}"
  - choose:
    - conditions: "{{ command == 'off' }}"
      sequence: !input 'button_one_short_press'
    - conditions: "{{ command == 'on' }}"
      sequence: !input 'button_two_short_press'
    - conditions: "{{ button_mode == 'StepMode.Up' }}"
      sequence: !input 'button_three_short_press'
    - conditions: "{{ button_mode == 'StepMode.Down' }}"
      sequence: !input 'button_four_short_press'
    - conditions: "{{ button_mode == 'MoveMode.Up' }}"
      sequence: !input 'button_three_long_press'
    - conditions: "{{ button_mode == 'MoveMode.Down' }}"
      sequence: !input 'button_four_long_press'
      

Here is the blueprint ready for import:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

3 Likes

at time i bought lidl 3bulbs+remote+gateway set.
recently i hacked the gateway and implemented successfully as generic ZHA gateway.
currently using a Xiaomi humidity/temperature sensor and now implementing 4buttons remote.
seems it’s seen correctly however even after importing your blueprints seems no event is triggered when pressing buttons.
am i missing something to let this remote working properly within HA?

sorry, just see this now.

i updated it on github. thanx man :slight_smile:

You need to create an automation based on the blueprint:
Using automation blueprints - Home Assistant (home-assistant.io)

Then you can set the actions you want while configuring your blueprint.

edit: after resetting also bridge and moving to another position now it’s working. so it was matter of radio communication (bridge was near to a 2.4 ghz wifi access point)

-------------------------------- old message below ----------

hi, thanks for reply… i just missed it ^^’

i’ve already created automation after importing OP’s blueprint.
see device’s related automation:

but it’s not triggered when i press buttons.

I can see Zigbee logs on ZHA “show logs” when i delete/add again remote device

Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x78E5), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.Group: 1>, address=0x0000), dst_ep=255, source_route=None, extended_timeout=False, tsn=55, profile_id=260, cluster_id=8, data=Serialized[b'\x01\x02\x02\x013\n\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=140, rssi=-65)
Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x78E5), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.Group: 1>, address=0x0000), dst_ep=255, source_route=None, extended_timeout=False, tsn=55, profile_id=260, cluster_id=8, data=Serialized[b'\x01\x02\x02\x013\n\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=140, rssi=-65)
[0x78E5:1:0x0008] Received ZCL frame: b'\x01\x02\x02\x013\n\x00'
[0x78E5:1:0x0008] Received ZCL frame: b'\x01\x02\x02\x013\n\x00'
[0x78E5:1:0x0008] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False), tsn=2, command_id=2, *direction=<Direction.Server_to_Client: 0>)
[0x78E5:1:0x0008] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False), tsn=2, command_id=2, *direction=<Direction.Server_to_Client: 0>)
[0x78E5:1:0x0008] Decoded ZCL frame: LevelControl:step(step_mode=<StepMode.Down: 1>, step_size=51, transition_time=10, options_mask=None, options_override=None)
[0x78E5:1:0x0008] Decoded ZCL frame: LevelControl:step(step_mode=<StepMode.Down: 1>, step_size=51, transition_time=10, options_mask=None, options_override=None)
[0x78E5:1:0x0008] Received command 0x02 (TSN 2): step(step_mode=<StepMode.Down: 1>, step_size=51, transition_time=10, options_mask=None, options_override=None)
[0x78E5:1:0x0008] Received command 0x02 (TSN 2): step(step_mode=<StepMode.Down: 1>, step_size=51, transition_time=10, options_mask=None, options_override=None)
[0x78E5:1:0x0008] No explicit handler for cluster command 0x02: step(step_mode=<StepMode.Down: 1>, step_size=51, transition_time=10, options_mask=None, options_override=None)
[0x78E5:1:0x0008] No explicit handler for cluster command 0x02: step(step_mode=<StepMode.Down: 1>, step_size=51, transition_time=10, options_mask=None, options_override=None)

maybe something wrong with ZHA integration and/or Zigbee bridge, but other TH sensors seems working fine

I’m trying to get the Livarno Lux Remote Control Dimmer working with blueprint from DamianQuest
Unfortunately the two dim buttons won’t work.

Logbook tells me:
Lidl_remote1 Step event was fired with parameters: {'step_mode': <StepMode.Up: 0>, 'step_size': 51, 'transition_time': 10, 'options_mask': None, 'options_override': None}
And the blueprint gets trigger :

"Kantoorschakelaar" getriggerd door Lidl_remote1 Step event was fired with parameters: {'step_mode': 0, 'step_size': 51, 'transition_time': 10, 'options_mask': None, 'options_override': None}

Kantoorschakelaar is the automation That should activate a scene but it does not.

     - service: scene.turn_on
       target:
         entity_id: scene.kantoor_fel
       metadata: {}

I changed the blueprint in an attempt to make it work. Can somebody help me find the prolem?

action:
 - variables:
      command: "{{ trigger.event.data.command }}"
      args: "{{ trigger.event.data.params }}"
  - choose:
      - conditions: "{{ command == 'off' }}"
        sequence: !input button_one_short_press
      - conditions: "{{ command == 'on' }}"
        sequence: !input button_two_short_press
      - conditions: "{{ command == step and params == {'step_mode': '<StepMode.Up: 0>', 'step_size': 51, 'transition_time': 10, 'options_mask': None, 'options_override': None} }}"
        sequence: !input button_three_short_press
      - conditions: "{{ command == 'step' and params == {'step_mode': '<StepMode.Up: 1>', 'step_size': 51, 'transition_time': 10, 'options_mask': None, 'options_override': None} }}"
        sequence: !input button_four_short_press
      - conditions: '{{ command == "move" and params == [0, 51,] }}'
        sequence: !input button_three_long_press
      - conditions: '{{ command == "move" and params == [1, 51,] }}'
        sequence: !input button_four_long_press

The zha_event tells me:

event_type: zha_event
data:
  device_ieee: ec:1b:bd:ff:fe:fd:40:ae
  unique_id: ec:1b:bd:ff:fe:fd:40:ae:1:0x0008
  device_id: 544a7289b9a8021a4efe9d0f102ff02c
  endpoint_id: 1
  cluster_id: 8
  command: step
  args:
    - 0
    - 51
    - 10
  params:
    step_mode: 0
    step_size: 51
    transition_time: 10
    options_mask: null
    options_override: null
origin: LOCAL
time_fired: "2023-09-10T13:30:13.858306+00:00"
context:
  id: 01H9ZMJ8F2F9W8R2Z6QNW54H92
  parent_id: null
  user_id: null

Anybody a good suggestion?

I found my solution in FachKraft42 's Bleuprint

If still needed:

To get this automation working with other Livarno/Lidl Remotes, for example HG08376, you have to replace the Manufacturer in the yaml-file with the one shown in the ZHA Entity

Hope it helps :slight_smile:

Tobias

The new model the change code to

manufacturer: _TYZB01_hww2py6b

Is possible updating for run 2 model ?

M’y version of Blueprint

blueprint:
  source_url: https://github.com/Damian666/HomeAssistant/blob/2932abecbb73ddf09a47d1a3d8c759073b0b070f/blueprints/automation/Damian666/Lidl_4Button_Remote_Switch.yaml
  name: ZHA - Lidl 4Button Remote Switch - TYZB01_bngwdjsr
  description: Automate your Lidl/LivarnoLux 4Button Remote Switch using ZHA events. (TYZB01_bngwdjsr)
  domain: automation
  input:
    Lidl_4Button_Remote_switch:
      name: Lidl 4Button Remote Switch
      description: Select the Lidl 4Button Remote Switch to use
      selector:
        device:
          integration: zha
          manufacturer: _TYZB01_bngwdjsr
          multiple: false
    button_one_short_press:
      name: Single Press
      description: Action to run OFF button 0 single press
      default: []
      selector:
        action: {}
    button_two_short_press:
      name: Single Press
      description: Action to run On button 1 single press
      default: []
      selector:
        action: {}
    button_three_short_press:
      name: Single Press
      description: Action to run on button Up single press
      default: []
      selector:
        action: {}
    button_three_long_press:
      name: Long Press
      description: Action to run on button Up long press
      default: []
      selector:
        action: {}
    button_four_short_press:
      name: Single Press
      description: Action to run on button Down single press
      default: []
      selector:
        action: {}
    button_four_long_press:
      name: Long Press
      description: Action to run on button Down long press
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: !input 'Lidl_4Button_Remote_switch'
action:
  - variables:
      command: "{{ trigger.event.data.command }}"
      button_mode: "{{ trigger.event.data.args[0] }}"
  - choose:
    - conditions: "{{ command == 'off' }}"
      sequence: !input 'button_one_short_press'
    - conditions: "{{ command == 'on' }}"
      sequence: !input 'button_two_short_press'
    - conditions: "{{ button_mode == 'StepMode.Up' }}"
      sequence: !input 'button_three_short_press'
    - conditions: "{{ button_mode == 'StepMode.Down' }}"
      sequence: !input 'button_four_short_press'
    - conditions: "{{ button_mode == 'MoveMode.Up' }}"
      sequence: !input 'button_three_long_press'
    - conditions: "{{ button_mode == 'MoveMode.Down' }}"
      sequence: !input 'button_four_long_press'

or 2 type device

blueprint:
  source_url: https://github.com/Damian666/HomeAssistant/blob/2932abecbb73ddf09a47d1a3d8c759073b0b070f/blueprints/automation/Damian666/Lidl_4Button_Remote_Switch.yaml
  name: ZHA - Lidl 4Button Remote Switch - TYZB01_hww2py6b
  description: Automate your Lidl/LivarnoLux 4Button Remote Switch using ZHA events. (TYZB01_hww2py6b)
  domain: automation
  input:
    Lidl_4Button_Remote_switch:
      name: Lidl 4Button Remote Switch
      description: Select the Lidl 4Button Remote Switch to use
      selector:
        device:
          integration: zha
          manufacturer: _TYZB01_hww2py6b
          multiple: false
    button_one_short_press:
      name: Single Press
      description: Action to run OFF button 0 single press
      default: []
      selector:
        action: {}
    button_two_short_press:
      name: Single Press
      description: Action to run On button 1 single press
      default: []
      selector:
        action: {}
    button_three_short_press:
      name: Single Press
      description: Action to run on button Up single press
      default: []
      selector:
        action: {}
    button_three_long_press:
      name: Long Press
      description: Action to run on button Up long press
      default: []
      selector:
        action: {}
    button_four_short_press:
      name: Single Press
      description: Action to run on button Down single press
      default: []
      selector:
        action: {}
    button_four_long_press:
      name: Long Press
      description: Action to run on button Down long press
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: !input 'Lidl_4Button_Remote_switch'
action:
  - variables:
      command: "{{ trigger.event.data.command }}"
      button_mode: "{{ trigger.event.data.args[0] }}"
  - choose:
    - conditions: "{{ command == 'off' }}"
      sequence: !input 'button_one_short_press'
    - conditions: "{{ command == 'on' }}"
      sequence: !input 'button_two_short_press'
    - conditions: "{{ button_mode == 'StepMode.Up' }}"
      sequence: !input 'button_three_short_press'
    - conditions: "{{ button_mode == 'StepMode.Down' }}"
      sequence: !input 'button_four_short_press'
    - conditions: "{{ button_mode == 'MoveMode.Up' }}"
      sequence: !input 'button_three_long_press'
    - conditions: "{{ button_mode == 'MoveMode.Down' }}"
      sequence: !input 'button_four_long_press'
1 Like

The blueprint from @FachKraft42 is working for me (thanks!). But I am using remote for lamp as second switch. First is smart switch on the wall. Unfortunately, it looks the remote is remembering the internal state and will not send zigbee packet twice for “on” without one “off” between. The scenario is: switch on with the remote, switch off on the wall - then you cannot switch on with remote as remote is remembering (somewhere) he is on. I was listening to ZHA events in developer tools and it looks I have to first switch off and then on to reset the remote.

Did someone noticed this behaviour?

Hi and Thank you for the Blueprint, really helpful!
I have been looking for a way to increase/decrease the percentage of the dim steps, currently around 10% per press and then off, to me the light is to bright at 10%
Is there a way to set so that short-press changes 1% and longpress uses default.
Cheers!

Yes, I have the same behaviour. You can only send ON once.

It looks like a problem in HA implementation of this controller. If is this controller paired directly with light then the next “ON” button click is working and changes the color of the light.
Unfortunately, I am very new in HA and I am not able to check it by myself.

1 Like

Were you able to find how to trigger color change for that light?