Skip to content

Create ability to use msg.override to send overrides#74

Open
albarlow wants to merge 2 commits into
niklaswall:masterfrom
albarlow:master
Open

Create ability to use msg.override to send overrides#74
albarlow wants to merge 2 commits into
niklaswall:masterfrom
albarlow:master

Conversation

@albarlow
Copy link
Copy Markdown

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).

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.
@albarlow
Copy link
Copy Markdown
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')

@Edo78
Copy link
Copy Markdown

Edo78 commented Oct 27, 2021

Just wonder if this PR gonna be merged sooner or later?

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.

2 participants