File tree 1 file changed +9
-0
lines changed
tasmota/tasmota_xdrv_driver
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,12 @@ void MagicSwitchLoop()
105
105
}
106
106
}
107
107
108
+ void MagicSwitchSetPower (void ) {
109
+ // It can happen that on relay switch, disturbances on the mains is falsy see as a MagicSwitch pulse
110
+ // This restart the masking windows on every power change to avoid that effect
111
+ MagicSwitch->switch_state = MAGICSWITCH_MASKING_WINDOW_LEN;
112
+ }
113
+
108
114
/* *******************************************************************************************************
109
115
* Driver initialisation
110
116
*/
@@ -173,6 +179,9 @@ bool Xdrv71(uint32_t function) {
173
179
// case FUNC_EVERY_250_MSECOND:
174
180
MagicSwitchLoop ();
175
181
break ;
182
+ case FUNC_SET_POWER:
183
+ MagicSwitchSetPower ();
184
+ break ;
176
185
case FUNC_ADD_SWITCH:
177
186
result = MagicSwitchAddSwitch ();
178
187
break ;
You can’t perform that action at this time.
0 commit comments