Change SwitchType in extended plugin framework
Posted: Friday 10 May 2024 12:04
Hello,
How do you revert to on/off switch with extended plugin framework? The Update() method of Unit object allow only TypeName (not Type / SubType / SwitchType) as parameter to change a switch type. If I create a switch as "Contact" TypeName, it seems that I cannot come back to standard on/off switch with Update(TypeName="Switch") because in Domoticz maptypename function (https://github.com/domoticz/domoticz/bl ... s.cpp#L375), SwitchType is not enforced when TypeName == "Switch" and Update() method from Python doesn't allow to set SwitchType.
Thank you for your suggestions.
How do you revert to on/off switch with extended plugin framework? The Update() method of Unit object allow only TypeName (not Type / SubType / SwitchType) as parameter to change a switch type. If I create a switch as "Contact" TypeName, it seems that I cannot come back to standard on/off switch with Update(TypeName="Switch") because in Domoticz maptypename function (https://github.com/domoticz/domoticz/bl ... s.cpp#L375), SwitchType is not enforced when TypeName == "Switch" and Update() method from Python doesn't allow to set SwitchType.
Thank you for your suggestions.