-
Fototrend
Okos Otthon összefoglaló
Új hozzászólás Aktív témák
-
yogee
tag
Hi!
Szerintem így kell kinéznie a scriptnek:local heating_probe = 'Nappali'
local thermostat_setpoint = 'Thermo'
local heating_unit = 'futes'
-- Use when a combined sensor (e.g. temperature and humidity) is used
-- Replace in "otherdevices[heating_probe]" to "otherdevices[heating_probe]" by "temp_only" (in the 2nd "if" and in the "elseif".
-- Remove the -- in the next two lines:
local naartekst = (tostring (otherdevices[heating_probe]))
local temp_only = (string.sub(naartekst,1,4)) -- the digits (1,4) do point out what characters of the string are needed.
local hysteresis = 0.1
commandArray = {}
-- loop through all the devices
for deviceName,deviceValue in pairs(otherdevices) do
if (deviceName== thermostat_setpoint ) then
if tonumber(deviceValue) < tonumber(temp_only-hysteresis) then
if (otherdevices[heating_unit] == "On") then
-- commandArray['SendNotification']='Heating is off'
commandArray[heating_unit]='Off'
print("Heating is Off")
end
elseif tonumber(deviceValue) > tonumber(temp_only+hysteresis) then
if (otherdevices[heating_unit] == "Off") then
commandArray[heating_unit]='On'
-- commandArray['SendNotification']='Heating is on'
print("Heating is On")
end
end
end
end
-- loop through all the variables
for variableName,variableValue in pairs(uservariables) do
end
return commandArray
Új hozzászólás Aktív témák
- Kanada feltalálta a Netflix-adót
- Felturbózott Edge 50 Fusiont kapott az Egyesült Államok
- Formula-1
- Bambu Lab X1/X1C, P1P-P1S és A1 mini tulajok
- BestBuy topik
- exHWSW - Értünk mindenhez IS
- Samsung Galaxy S22 és S22+ - a kis vagány meg a bátyja
- Mobil flották
- LG C4 tévé, a népszerű OLED-sorozat legfrissebb tagja
- Melyik tápegységet vegyem?
- További aktív témák...
- Eladó-Kiadó ingatlan táblák , hogy sikeres legyen az eladás! PH tagoknak 30% kedvezménnyel!
- Erős asztalláb (Steelcase)
- Traktor és kamion matricák széles választékban! PH tagoknak 30% kedvezmény!
- Eladó Családi Ház Nőtincsen 70 négyzetméter Lakó rész + 40 négyzetméter beépíthető rész
- Arlo Smarthub VMB4540 Féláron!
Állásajánlatok
Cég: Alpha Laptopszerviz Kft.
Város: Pécs
Cég: Ozeki Kft.
Város: Debrecen