-
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
- AMD Ryzen 9 / 7 / 5 7***(X) "Zen 4" (AM5)
- Ukrajnai háború
- Mibe tegyem a megtakarításaimat?
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Adatmentés - HDD - SSD - Flash
- Új akkumulátortechnológiát hoz a OnePlus
- Politika
- PlayStation 5
- Autóápolás, karbantartás, fényezés
- NVIDIA GeForce RTX 3060 Ti / 3070 / 3070 Ti (GA104)
- További aktív témák...