ist eingefügt, aber auch da bleibt der button unangetastet.
--[[
%% properties
3 ConditionCode
%% globals
--]]
local weather_code = fibaro:getValue(3, 'ConditionCode')
local previous_weather_code = fibaro:getValue(3, 'PreviousConditionCode')
local AM_Status = fibaro:getGlobal('AM_Status')
local id = 94
if (weather_code == previous_weather_code) then
--fibaro:debug('weather_code hat sich nicht geändert.')
else
fibaro:debug('Wettervorhersage v0.01 gestartet.')
fibaro:debug('ConditionCode: ' ..weather_code.. ' / Prüfe Wetterbedingung')
if (weather_code == '6' or weather_code == '9' or weather_code == '11' or weather_code == '12' or weather_code == '40') then
fibaro:debug('Wettervorhersage: Regen')
elseif (weather_code == '31' or weather_code == '32' or weather_code == '33' or weather_code == '34') then
fibaro:debug('Wettervorhersage: klar')
elseif (weather_code == '17' or weather_code == '29' or weather_code == '30' or weather_code == '44') then
fibaro:debug('Wettervorhersage: leicht bewölkt')
elseif (weather_code == '26' or weather_code == '35') then
fibaro:debug('Wettervorhersage: bewölkt')
elseif (weather_code == '27' or weather_code == '28') then
fibaro:debug('Wettervorhersage: stark bewölkt')
elseif (weather_code == '19' or weather_code == '20' or weather_code == '21' or weather_code == '22') then
fibaro:debug('Wettervorhersage: Nebel')
elseif (weather_code == '3' or weather_code == '4' or weather_code == '37' or weather_code == '38' or weather_code == '39' or weather_code == '45' or weather_code == '46') then
fibaro:debug('ACHTUNG: Gewitter')
elseif (weather_code == '5' or weather_code == '7' or weather_code == '14' or weather_code == '19' or weather_code == '42' or weather_code == '46') then
fibaro:debug('Wettervorhersage: Möglicherweise Schnee/Schneeregen')
elseif (weather_code == '13' or weather_code == '15' or weather_code == '16' or weather_code == '41' or weather_code == '42' or weather_code == '43') then
fibaro:debug('Wettervorhersage: Schnee')
elseif (weather_code == '17' or weather_code == '35') then
fibaro:debug('ACHTUNG: Hagel')
elseif (weather_code == '8' or weather_code == '10') then
fibaro:debug('Wettervorhersage: Überfrierende Nässe')
elseif (weather_code == '0' or weather_code == '1' or weather_code == '2' or weather_code == '23' or weather_code == '23') then
fibaro:debug('Wettervorhersage: Stürmisch')
elseif (weather_code == '25') then
fibaro:debug('Wettervorhersage: Kalt (Was immer das heißt...)')
elseif (weather_code == '36') then
fibaro:debug('Wettervorhersage: Heiß (Was immer das heißt...)')
elseif (weather_code == '3200') then
fibaro:debug('Code 3200. Nicht bekannt.')
end
if
(weather_code == '6' or weather_code == '9' or weather_code == '11' or weather_code == '12' or weather_code == '40' or
weather_code == '19' or weather_code == '20' or weather_code == '21' or weather_code == '22' or
weather_code == '3' or weather_code == '4' or weather_code == '37' or weather_code == '38' or weather_code == '39' or weather_code == '45' or weather_code == '46' or
weather_code == '5' or weather_code == '7' or weather_code == '14' or weather_code == '19' or weather_code == '42' or weather_code == '46' or
weather_code == '13' or weather_code == '15' or weather_code == '16' or weather_code == '41' or weather_code == '42' or weather_code == '43' or
weather_code == '17' or weather_code == '35' or
weather_code == '8' or weather_code == '10' or
weather_code == '0' or weather_code == '1' or weather_code == '2' or weather_code == '23' or weather_code == '23' or
weather_code == '3200')
and
AM_Status == 2
then
fibaro:call(94, "pressButton", "4");
fibaro:debug('Automower Modus: HOME gesetzt')
elseif
(weather_code == '31' or weather_code == '32' or weather_code == '33' or weather_code == '34' or
weather_code == '17' or weather_code == '29' or weather_code == '30' or weather_code == '44' or
weather_code == '26' or weather_code == '35' or
weather_code == '36')
and
AM_Status == 0 or AM_Status == 1 or AM_Status == 3
then
fibaro:call(94, "pressButton", "2");
fibaro:debug('Automower Modus: AUTO gesetzt')
else
fibaro:debug('weather_code : '..weather_code)
fibaro:debug('AM_Status : '..AM_Status)
end
end
die id ist die richtige, da die status-refresh-scene auch mit dieser id minütlich läuft
kann ich noch irgendwas ändern eurer Meinung nach?