Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WXKG07LM.yml #273

Merged
merged 1 commit into from
Apr 7, 2021
Merged

Update WXKG07LM.yml #273

merged 1 commit into from
Apr 7, 2021

Conversation

jant90
Copy link
Contributor

@jant90 jant90 commented Apr 7, 2021

Fixed a few mistakes in the documentation regarding ZHA action types for this controller

Fixed a few mistakes in the documentation regarding ZHA action types for this controller
@xaviml
Copy link
Owner

xaviml commented Apr 7, 2021

Hi @jant90,

Thanks for the fix in the documentation. Do you happen to have this controller integrated with ZHA? Could you please confirm these are the mappings? Especially "both_long press", "left_long press" and "right_long press". It is not normal to have a space in the event, but I was not sure about it.

I will merge this straight away.

Regards,
Xavi M.

@xaviml xaviml merged commit d274ed8 into xaviml:dev Apr 7, 2021
@jant90
Copy link
Contributor Author

jant90 commented Apr 7, 2021

Yes, they really show up with a space, this confused me as well so maybe put a warning in the docs? Also I was afraid this wouldn't work in YAML markup or something, but this is working fine:

  actions:
    - left_single
    - left_double
    - left_long press
  mapping:
    left_single:
      action: toggle
    left_long press:
      action: sync

Here is an example from the event viewer:

    "event_type": "zha_event",
    "data": {
        "device_ieee": "x",
        "unique_id": "x",
        "device_id": "x",
        "endpoint_id": 1,
        "cluster_id": 18,
        "command": "left_long press",
        "args": {
            "button": "left",
            "press_type": "long press",
            "attr_id": 85,
            "value": 0
        }
    }

@xaviml
Copy link
Owner

xaviml commented Apr 7, 2021

Thank you @jant90 for the response back :) After merging your PR, I quoted all the ZHA events, so it is clear that it is the whole string. In the YAML you can also quoted, so it is clear it goes together:

actions:
    - left_single
    - left_double
    - left_long press
  mapping:
    "left_single":
      action: toggle
    "left_long press":
      action: sync

Cheers,

@jant90
Copy link
Contributor Author

jant90 commented Apr 8, 2021

Thanks! That looks clear to me :).

One more (pretty unrelated) question: what's the meaning of the "350ms delay" mentioned after the light controller part for pretty much every controller in the docs?

I'm asking because I noticed a hard-coded delay/latency of about 350ms in my Aqara (WXKG07LM) and Mijia (WXKG01LM) controllers that I don't see in my Hue Dimmer switch, yet the docs do mention a 350ms delay for that controller as well.

@xaviml
Copy link
Owner

xaviml commented Apr 8, 2021

The "350ms delay" you see in almost each page is the default delay for that controller. You can find this attribute explanation in the Light Controller parameters from here. Documentation says:

Delay in milliseconds that takes between sending the instructions to the light (for the smooth functionality). Note that if leaving to 0, you might get uncommon behavior.

So basically, this attribute is related to hold actions, like dimming up/down your lights.

The delay you are experiencing is not related to this parameter, it might be due to the integration you have your controller is using.

Regards,
Xavi M.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants