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

Support for zwave light transitions #6868

Merged
merged 3 commits into from Apr 3, 2017
Merged

Support for zwave light transitions #6868

merged 3 commits into from Apr 3, 2017

Conversation

emlove
Copy link
Contributor

@emlove emlove commented Mar 31, 2017

Description:

This PR adds transition support to zwave lights. Unfortunately not all lights support it, since it was added with COMMAND_CLASS_SWITCH_MULTILEVEL version 2. I've tested it with an Aeotec ZW098.

@mention-bot
Copy link

@armills, thanks for your PR! By analyzing the history of the files in this pull request, we identified @turbokongen, @balloob and @leoc to be potential reviewers.

@@ -72,6 +72,13 @@ def brightness_state(value):
return 0, STATE_OFF


def ct_to_rgb(temp):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated, but I just moved this up so it's not in-between the two classes.

return

if ATTR_TRANSITION not in kwargs:
self.values.dimming_duration.data = 0xFF
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you check in OZW_Log.txt if this assignment causes a zwave message to be sent when data doesn't actually changes? (i.e. it was already 0xFF)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'll take a look, but at least from a theoretical level it shouldn't. The dimming duration is actually just a parameter that gets sent with the multilevel switch set command.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here it is. You can see where the dimming_duration is part of the SwitchMultilevelCmd_Set message to the network.

2017-04-01 15:41:20.398 Info, Node003, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Dimming Duration - 5 - 1 - \FF
2017-04-01 15:41:20.398 Detail, Node003, Refreshed Value: old value=255, new value=255, type=byte
2017-04-01 15:41:20.398 Detail, Node003, Changes to this value are not verified
2017-04-01 15:41:20.398 Detail, Node003, Notification: ValueChanged
2017-04-01 15:41:20.398 Info, Node003, Value::Set - COMMAND_CLASS_SWITCH_MULTILEVEL - Level - 0 - 1 - 
2017-04-01 15:41:20.398 Info, Node003, SwitchMultilevel::Set - Setting to level 0
2017-04-01 15:41:20.398 Info, Node003,   Duration: Default
2017-04-01 15:41:20.399 Detail, Node003, Setting Encryption Flag on Message For Command Class COMMAND_CLASS_SWITCH_MULTILEVEL
2017-04-01 15:41:20.399 Detail, Node003, Queuing (Send) SwitchMultilevelCmd_Set (Node=3): 0x01, 0x0b, 0x00, 0x13, 0x03, 0x04, 0x26, 0x01, 0x00, 0xff, 0x25, 0x4d, 0x50
2017-04-01 15:41:20.399 Detail, Node003, Setting Encryption Flag on Message For Command Class COMMAND_CLASS_SWITCH_MULTILEVEL
2017-04-01 15:41:20.399 Detail, Node003, Queuing (Send) SwitchMultilevelCmd_Get (Node=3): 0x01, 0x09, 0x00, 0x13, 0x03, 0x02, 0x26, 0x02, 0x25, 0x4e, 0xab
2017-04-01 15:41:20.402 Detail, 

@emlove
Copy link
Contributor Author

emlove commented Apr 3, 2017

I noticed that supported_features was never updated to reflect the transition. The existing method would start getting a bit messy, so I adjusted the implementation a bit.

@emlove emlove requested a review from andrey-git April 3, 2017 16:17
@emlove emlove merged commit 06e1c21 into home-assistant:dev Apr 3, 2017
@emlove emlove deleted the zwave-transition branch April 3, 2017 18:56
@fabaff fabaff mentioned this pull request Apr 6, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Jul 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants