mirror of https://github.com/arendst/Tasmota.git
Add command Power0 0/1/2/Off/On/Toggle to control all power outputs at once
Add command Power0 0/1/2/Off/On/Toggle to control all power outputs at once (#6340)
This commit is contained in:
parent
41f76c5128
commit
34eed717fa
|
@ -6,6 +6,7 @@
|
|||
* Add 'sonoff-ir' pre-packaged IR-dedicated firmware and 'sonoff-ircustom' to customize firmware with IR Full protocol support
|
||||
* Add Zigbee support phase 2 - cc2530 initialization and basic ZCL decoding
|
||||
* Add driver USE_SDM120_2 with Domoticz P1 Smart Meter functionality as future replacement for USE_SDM120 - Pls test and report
|
||||
* Add command Power0 0/1/2/Off/On/Toggle to control all power outputs at once (#6340)
|
||||
*
|
||||
* 6.6.0.8 20190827
|
||||
* Add Tuya Energy monitoring by Shantur Rathore
|
||||
|
|
|
@ -258,10 +258,19 @@ void CmndPower(void)
|
|||
{
|
||||
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= devices_present)) {
|
||||
if ((XdrvMailbox.payload < 0) || (XdrvMailbox.payload > 4)) { XdrvMailbox.payload = 9; }
|
||||
// Settings.flag.device_index_enable = user_index;
|
||||
// Settings.flag.device_index_enable = XdrvMailbox.usridx;
|
||||
ExecuteCommandPower(XdrvMailbox.index, XdrvMailbox.payload, SRC_IGNORE);
|
||||
mqtt_data[0] = '\0';
|
||||
}
|
||||
else if (0 == XdrvMailbox.index) {
|
||||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 2)) {
|
||||
if (2 == XdrvMailbox.payload) {
|
||||
XdrvMailbox.payload = (power) ? 0 : 1;
|
||||
}
|
||||
SetAllPower(XdrvMailbox.payload, SRC_IGNORE);
|
||||
mqtt_data[0] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CmndStatus(void)
|
||||
|
|
Loading…
Reference in New Issue