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 zha args for ZigBee 3.0 firmware #46

Merged
merged 3 commits into from
Mar 2, 2020
Merged

Update zha args for ZigBee 3.0 firmware #46

merged 3 commits into from
Mar 2, 2020

Conversation

sreknob
Copy link
Contributor

@sreknob sreknob commented Feb 29, 2020

@xaviml - with new firmware version the args have changed for these remotes.
This PR duplicates the hold events to capture both version of the args
The zha developers may find a way to keep them consistent in the future, but it might be a bit before that happens (HASS 107) so this will patch the user experience until this happens.
If removed in the future due to changes on the quirk end, can remove these changes with a breaking change notice for those who set up custom mapping.

With ZB 3.0 firmware the long press args changes for up and down for E1810/E1524
This duplicates the events to ensure both old and new firmware works as expected.
@sreknob
Copy link
Contributor Author

sreknob commented Feb 29, 2020

This should fix #45

Added in E1810 toggle hold (3 seconds) events for lights --> ON_FULL_BRIGHTNESS
Not sure what to do with the zha extra long press (3.5 seconds)
Only zha supports it as "press_2_0_0"
When paired directly to ikea bulbs it resets the color temp to their default 2700K/warm white.
Is it possible to implement a default color temp config to use?
Copy link
Owner

@xaviml xaviml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sreknob,

Thanks for the PR! I put some comments regarding the center button. The problem is that in all integration the toggle action is fired first before the toggle_hold action.

@@ -13,6 +13,7 @@ class E1810Controller(LightController):
def get_z2m_actions_mapping(self):
return {
"toggle": Light.TOGGLE,
"toggle_hold": Light.ON_FULL_BRIGHTNESS,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When holding the button. It sends hold straight away and after 3 seconds it sends toogle_hold. So this means that if the light is on, you will experience that ehe light will turn off when holding the button and after 3 seconds it will turn the light again to full brightness. For this reason, I did not add this behaviour to the default controller, it is rather confusing.

Suggested change
"toggle_hold": Light.ON_FULL_BRIGHTNESS,

@@ -30,6 +31,7 @@ def get_z2m_actions_mapping(self):
def get_deconz_actions_mapping(self):
return {
1002: Light.TOGGLE,
1001: Light.ON_FULL_BRIGHTNESS,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is the event when holding, but does the 1002 fires when holding? Same as z2m?

Comment on lines +52 to +53
"move_to_level_with_on_off_254_0": Light.ON_FULL_BRIGHTNESS,
### "press_2_0_0": SET A DEFULT COLOR TEMP?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You said the following:

A long press generates:
toggle right away, followed by release then move_to_level_with_on_off_254_0 then press_2_0_0 all in quick succession after the center button is held for 3 seconds.

We have the same problem that I described before, the "toggle" action fires first, so it is not useful to use the hold center button.

Suggested change
"move_to_level_with_on_off_254_0": Light.ON_FULL_BRIGHTNESS,
### "press_2_0_0": SET A DEFULT COLOR TEMP?

@xaviml
Copy link
Owner

xaviml commented Mar 2, 2020

I will merge this PR and I will do the change from here as discussed in #45

@xaviml xaviml merged commit fb84a5a into xaviml:dev Mar 2, 2020
@sreknob sreknob deleted the patch-2 branch March 2, 2020 16:21
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