I am new to Domoticz and Python, (still I have good experience in Java)
I am trying a Python script like this:
Code: Select all
import DomoticzEvents as DE
import domoticz
for name, device in domoticz.devices.items():
if device.name=='Luce Camera Gio':
if device.is_off():
device.on(after=3)
device=Device(). The script does not work. I read the domoticz.py module too.
Code: Select all
The log message is "2020-07-11 18:25:18.698 Error: EventSystem: Failed to execute
python event script "luce"
Giovannni