Log what's inside a variable
Posted: Thursday 03 October 2019 22:38
This normally should be simple, for debugging i like to see what's inside a variable.
Here the variable "Heizmodus" in domoticz is filled with "Heizen" from another script by outer temp, while the if statement NEVER occurs true an id never get the loglines at the end.
So the simple question, so the next user get a result from google: How to print a variable into the log?
Solderbro
Here the variable "Heizmodus" in domoticz is filled with "Heizen" from another script by outer temp, while the if statement NEVER occurs true an id never get the loglines at the end.
Code: Select all
local heizpause = domoticz.variables("Heizmodus").state
local t = domoticz.time
local spirit = domoticz.devices('Stube HZG Thermostat')
local spirith = domoticz.devices('Stube HZG Heizpunkt')
local spirite = domoticz.devices('Stube HZG Ecopunkt')
if heizpause == 'Heizen' then
print('Modus Stube setzen')
domoticz.log('Hey! I am on!')
Solderbro