Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Feature request - change response codes RWL #176

Open
Mariusthvdb opened this issue Jan 27, 2020 · 1 comment
Open

Feature request - change response codes RWL #176

Mariusthvdb opened this issue Jan 27, 2020 · 1 comment

Comments

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Jan 27, 2020

Since the remotes.py is being rewritten at the moment, this might be a good time to restore the native events the Hue Api passes along, see https://developers.meethue.com/develop/hue-api/supported-devices/#supportred-sensors for the official documentation.

I've changed my local file to follow the api docs, which is like this:

    responsecodes = {"0": "_initial_press", "1": "_hold", "2": "_short_released", "3": "_long_released"}

Since the response codes were changed to:

def parse_rwl(response):
    """Parse the json response for a RWL Hue remote."""

    """
        I know it should be _released not _up
        but _hold_up is too good to miss isn't it
    """
    responsecodes = {"0": "_click", "1": "_hold", "2": "_click_up", "3": "_hold_up"}

my system (and I...) have always been confused about the difference between a click (initial_press), and click_up (short_released)

having the combos click/click_up and hold/hold_up would suggest there's only 2 kinds of clicks,
using the official button events makes the HA frontend clearer as to what really happend, and one can easily follow the action. Waiting for the second green led flicker initiates the hold or long_released

@robmarkcole robmarkcole changed the title change response codes RWL Feature request - change response codes RWL Jan 27, 2020
@Mariusthvdb
Copy link
Contributor Author

Mariusthvdb commented Jan 27, 2020

just adding images to the above

this is what it looks like with the changes (btw I changed 'click' to 'tap' on the ZGP Hue tap, and adapted the icons to the most striking mdi representations I could find):

Schermafbeelding 2020-01-27 om 14 29 37

compared to the original using hold_up etc
Schermafbeelding 2020-01-27 om 14 29 47

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

No branches or pull requests

2 participants