ZG-101L button "action" cannot be get (read)

Hi

I recently bought a zigbee button to control some devices that couldnt connect to a wired switch. The button was correctly connected to Z2MQTT and I is detected as ZG-101L

It exposes 3 variables: battery, Operation mode and action. The problem is the action variable cannot be read or write and if I search the states with this device name, only battery and operation appears. “action” is the main variable for this devices as it shows when the button is pushed, but if it cannot be read I don’t know how to use the device.

Any advice?

For your device:

The possible values are: single , double , hold , brightness_move_to_level , color_temperature_move , brightness_step_up , brightness_step_down , on , off

Thanks

It’s I really strange that both options are deactivated so by default no action can be used in home assistant.

I activated the experimental option as I was not using any action previously so nothing can be broken but I’m getting an error.

What should I do to solve this error?

Despite this error, after restarting the add on the event variable now appears in the states so I guess I can use it now.

This button has been an issue as of late

Yeah, that’s a known issue but not related with this one because it’s not related with the actions

I’d argue any integration issues are related and you just cross posted

It is apparent the device needs some work for Z2M

As I explained in the other post they are different problems.

The first one is related with not being able to use the actions. That is not a problem related with the integration of this device but with the configuration of Z2M itself as explained previously in this post by @tom_l . It is solved by configuring correctly the addon. After doing it, the action can be used but an error message appears in the Z2M addon, but not linked to this device but with the addon configuration. If you have any suggestion on how to avoid this problem it would be very helpful.

The other problem with the operation mode it’s related with the integration, but it’s a different problem. I didn’t know crossposting was a problem. It seems helpful to link to the post where the solution is shown , as done in this post by the moderator.

You have to do it in YAML. config/zigbee2mqtt/configuration.yaml

See: https://www.zigbee2mqtt.io/guide/configuration/homeassistant.html

1 Like

Unfortunately, the device availability is extremely limited
I

Not an expert, but know the actions has been a problem for a bit

Thanks again

I tried to change it in the configuration.yaml but it seems that, despite the error appearing, the configuration was done after restarting the addon , as these options (enabling discovering and the experimental option) are already changed to true in the configuration.yaml. Maybe the error is appearing because the change was made with the addon running?

You would not be able to visit the z2m webpage if the add-on was stopped :slight_smile:

And yes restarting the add-on is required when you change the config.

Here’s an alternate version of the button automation that works for me:

- id: 23cd99f6-6054-43cc-9fbe-a89570fb0bfa
  alias: Master Bed Button Events
  triggers:
  - trigger: state
    entity_id: event.master_bed_button_action
    to: ~
  conditions:
  - condition: template
    value_template: "{{trigger.from_state.state != 'unavailable'}}"
  actions:
  - choose:
    - conditions:
      - condition: template
        value_template: "{{trigger.to_state.attributes.event_type == 'single'}}"
      sequence:
      - action: light.toggle
        target:
          entity_id: 
          - light.lifx_mstr_bed_lamp_left
          - light.lifx_mstr_bed_lamp_right
      - action: lifx.set_state
        entity_id: 
        - light.lifx_mstr_bed_lamp_left
        - light.lifx_mstr_bed_lamp_right
        data:
          brightness: "{{ states('sensor.calculated_light_brightness_25pct_min')|int(0) }}"
          color_temp_kelvin: 2700
    - conditions:
      - condition: template
        value_template: "{{trigger.to_state.attributes.event_type == 'double'}}"
      sequence:
      - action: script.master_bed_close
    - conditions:
      - condition: template
        value_template: "{{trigger.to_state.attributes.event_type == 'triple'}}"
      sequence:
      - action: script.master_bed_east_open
    - conditions:
      - condition: template
        value_template: "{{trigger.to_state.attributes.event_type == 'hold'}}"
      sequence:
      - action: script.master_bed_favourite
2 Likes