legt mir das Boolean Profil TK.Test an, und ich habe die Werte „off“ und „on“.
Wenn ich nun aber einen Unit Test schreibe bekomme ich den Fehler:
„TypeError: Argument 2 passed to IPS_SetVariableProfileAssociation() must be of the type float, bool given, called in…“
Und siehe da, die Doku sagt auch, dass es float sein muss.
Mach ich etwas falsch?
Oder sind Doku und Stub falsch?
Die Doku ist richtig. Es muss tatsächlich ein float sein. Bin auch schon mal darüber gestolpert. Die Funktion ist für alle Profiltypen gültig, daher float.
Das tritt auch nur bei tests auf, da hier ja das Symcon Backend durch PHP ‚simuliert‘ wird.
Die Funktion IPS_SetVariableProfileAssociation verarbeitet auch bei strict alle andere Typen im echten Symcon.
Michael