Skip to content

Write script to toggle other device? #2883

Discussion options

You must be logged in to vote

Hi @stephanvierkant!

Yes it's possible, also now with scheduled-jobs it would be even easier :)

You should bind to node value updated or value notification event:

const button = driver.controller.nodes.get(63);
const light = driver.controller.nodes.get(69);

button.on('value updated', function (zwaveNode, args) {
    if(// check the valueId of the event) {
		light.setValue(valueId, value, options)
	}
}

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@robertsLando
Comment options

@robertsLando
Comment options

@stephanvierkant
Comment options

@robertsLando
Comment options

@stephanvierkant
Comment options

Answer selected by stephanvierkant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants