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

feat(cc): add value to set multiple color components at once #1782

Merged
merged 2 commits into from
Feb 22, 2021

Conversation

AlCalzone
Copy link
Member

With this PR, the Color Switch CC now has a combined value ID to set multiple color components at once:

// reading:
{
	commandClass: CommandClasses["Color Switch"],
	property: "currentColor",
	endpoint: endpointIndex,
}

// writing
{
	commandClass: CommandClasses["Color Switch"],
	property: "targetColor",
	endpoint: endpointIndex,
}

It accepts objects of the form

{
	warmWhite: /* 0..255 */,
	coldWhite: /* 0..255 */,
	red: /* 0..255 */,
	green: /* 0..255 */,
	blue: /* 0..255 */,
	amber: /* 0..255 */,
	cyan: /* 0..255 */,
	purple: /* 0..255 */,
}

where each entry is optional. Partial objects are merged with the existing settings.

fixes: #1526

@AlCalzone
Copy link
Member Author

@zwave-js-bot pack this

@zwave-js-bot
Copy link
Collaborator

👋 Hey @AlCalzone!
I've started to deploy this PR as a development build.
You can monitor the progress here.

@zwave-js-bot
Copy link
Collaborator

🎉 The packages have been published.
You can now install the test version with npm install [email protected].

@DanielWinks
Copy link

This works GREAT, however it needs #674 merged for it to work in ZwaveJS2MQTT.

@AlCalzone AlCalzone merged commit bcb9fe7 into master Feb 22, 2021
@AlCalzone AlCalzone deleted the combined-color branch February 22, 2021 21:25
AlCalzone added a commit that referenced this pull request Feb 23, 2021
### Features
* Implemented `Scene Actuator Configuration CC`
* Updated `Scene Controller Configuration CC` API to match `Scene Actuator Configuration CC`
* Values that could previously be `"unknown"` now default to `undefined` instead. If the distinction is relevant, the previous behavior can be restored using the driver option `preserveUnknownValues`.
* Added values to `Color Switch CC` to set multiple color components at once (#1782)
* Added the option `nodeFilter` to the logger configuration to limit logging to specific nodes

### Bugfixes
* Generating the config index no longer fails in production when single files have errors
* Fixed a crash that could happen while logging a message while the driver is not ready yet
* Fixed a crash that could happen while trying to bootstrap a device that does not respond after inclusion
* The state value in `Thermostat Fan Mode CC` is now readonly
* Firmware updates now disable the delayed activation feature by default
* When updating a different firmware target than 0, the correct firmware ID is now used
* The `Fibaro CC` now correctly understands unknown values.
* Value IDs for some controlled CCs are now also exposed through `getDefinedValueIDs`
* Do not map root endpoint values to all endpoints when multiple endpoints support the value
* The device index is now preserved in memory if it cannot be written to disk
* The unit of configuration parameters is now actually read from device configuration files
* The list of supported and controlled CCs of a node is no longer overwritten when a device sends a NIF on manual activation
* Add `toLogEntry` method to `Scene Actuator Configuration CC::Set` command

### Config file changes
* Added an additional Inovelli NZW31T model
* Use Node Associations for ZW132 Lifeline
* Added missing zero to LZW45 partial param 23 mask
* Correct heatit brand names
* Add Association Groups to Kwikset locks
* Fixed an incorrect device ID assignment of Kwikset 914/c
* Remove duplicate parameters from GED2350
* Add Zooz zen72, update zen71 description
* Small wording changes to flush technisat devices

### Changes under the hood
* The config files for Kwikset locks were refactored to use templates
* Configuration files may now include conditional sections
* A bunch of documentation updates: CC documentation, `ConfigManager`, API overview
* Clarified device file requirements
* Cleaned up the maintenance scripts that were spread out through the repo
* Issues with incomplete templates now get auto-staled quickly
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.

Color Switch CC: expose combined color values
3 participants