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: add ability to pass options to setValue calls #2894

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

AlCalzone
Copy link
Member

One of the most requested features is finally here. Behind this abstract title hides the possibility to use transition durations in the setValue API. Example:

await node.setValue(
	{
		commandClass: CommandClasses["Multilevel Switch"],
		property: "targetValue",
	},
	10,
	{
		transitionDuration: "15s",
	},
);

The method has gained a third optional argument, which is an options bag for the underlying calls. Each setValue implementation will choose the options it understands, so the object can be configured in one location and reused for all calls.

For now, this only supports the transitionDuration option, but allows us to add more in the future.

fixes: #1321
fixes: home-assistant/core#46234
fixes: home-assistant/core#48470

related: zwave-js/zwave-js-ui#1159

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