Create ability to use msg.override to send overrides#74
Open
albarlow wants to merge 2 commits into
Open
Conversation
Introduce msg.override as the new way to send override messages to the node. Update instructions to warn that old method is deprecated and may be removed in the future.
Author
|
I forgot to say, the way I wrote it, msg.override takes precedence over msg.payload (so if you sent 'on' in override and 'off' in payload, it would enact 'on') |
|
Just wonder if this PR gonna be merged sooner or later? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there, this is my first PR on an open source project so please forgive me if my etiquette isn't quite right! :)
I have added the ability to pass the overrides in a msg.override rather than msg.payload (whlist still retaining msg.payload as an option for backwards compatibility). I updated the HTML for the node to reflect the change and to warn that the old method was deprecated (looking at other conversations it sounded like that was the direction you might be going in).
I have tested this locally and it seems to do what I would expect - other than my change it seems to behave as usual.
I don't know if this would open up future opportunities to send an override alongside a supplemental payload (e.g. so you could pass a different payload to have a light switch on at a certain brightness) or to have a timed override (e.g. turn on a light that is scheduled off for a period specified in the payload).