add Speed2 !
to cancel pending one-shot speed setting
#15954
Merged
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.
Description:
Speed2 !
can be used to cancel the use of a precedingSpeed2
command. This is useful if you're usingSetoption20
(update of Dimmer/Color/CT without turning power on) so you can control things like the colour temperature of light from a cron job or schedule without the light turning on when you change the CT. However, if you haveFade 1
andSpeed 2
as your normal speed/fade settings, and you change the CT with a command likeBacklog Speed2 20; CT 500
to get a gradual fade when the light is on, theSpeed2
isn't "consumed" until the light is turned on. When you turn the light on later, it takes 10 seconds instead of 1.With
Speed2 !
, you can useBacklog Speed2 20; CT 500; Speed2 !
as the scheduled command. If the light is on, theSpeed2 10
is used by CT command immediately because the light is already on. If the light is off, the CT command doesn't take effect, leaving the precedingSpeed2
change ready to go when the light is actually turned on. TheSpeed2 !
clears that, so when you do turn the light on in the future it acts as expected (with theSpeed 2
setting).Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass