Add dummy fade2 (#10916)

This commit is contained in:
Theo Arends 2021-02-11 16:03:04 +01:00
parent a10c7c2235
commit 19dc2393fa
1 changed files with 40 additions and 36 deletions

View File

@ -2828,6 +2828,9 @@ void CmndRgbwwTable(void)
void CmndFade(void)
{
if (2 == XdrvMailbox.index) {
// Home Assistant backwards compatibility, can be removed mid 2021
} else {
// Fade - Show current Fade state
// Fade 0 - Turn Fade Off
// Fade On - Turn Fade On
@ -2845,22 +2848,22 @@ void CmndFade(void)
if (XdrvMailbox.payload >= 0 && XdrvMailbox.payload <= 2) SendDeviceGroupMessage(Light.device, DGR_MSGTYP_UPDATE, DGR_ITEM_LIGHT_FADE, Settings.light_fade);
#endif // USE_DEVICE_GROUPS
if (!Settings.light_fade) { Light.fade_running = false; }
}
ResponseCmndStateText(Settings.light_fade);
}
void CmndSpeed(void)
{
if (XdrvMailbox.index == 2) {
if (2 == XdrvMailbox.index) {
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 40)) {
Light.fade_once_enabled = true;
Light.fade_once_value = XdrvMailbox.payload > 0;
Light.fade_once_value = (XdrvMailbox.payload > 0);
Light.speed_once_enabled = true;
Light.speed_once_value = XdrvMailbox.payload;
if (!Light.fade_once_value) { Light.fade_running = false; }
}
return;
}
ResponseCmndNumber(Light.speed_once_value);
} else {
// Speed 1 - Fast
// Speed 40 - Very slow
// Speed + - Increment Speed
@ -2881,6 +2884,7 @@ void CmndSpeed(void)
}
ResponseCmndNumber(Settings.light_speed);
}
}
void CmndWakeupDuration(void)
{