Witajcie, chciałem sobie zrobić scene która będzie mi sprawdzać stan okien, a mianowicie czy są zamknięte wszystkie okna czy tez wszystkie okna są otwarte i tutaj mam kłopot, bo przy zastosowaniu kodu znajdującego się poniżej oba warunki zostają spełnione. Jak to zrobić inaczej ?
if (
( tonumber(fibaro:getValue(534, "value")) > 0 and tonumber(fibaro:getValue(194, "value")) > 0 and tonumber(fibaro:getValue(198, "value")) > 0 )
or
startSource["type"] == "other"
)
then
fibaro:call(583, "pressButton", "13");
end
if (
( tonumber(fibaro:getValue(534, "value")) == 0 and tonumber(fibaro:getValue(194, "value")) == 0 and tonumber(fibaro:getValue(198, "value")) == 0 )
or
startSource["type"] == "other"
)
then
fibaro:call(12, "turnOn");
end