Dzvent Read Triangle Alert Value/Colour

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
paul402
Posts: 96
Joined: Monday 23 May 2016 23:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Dzvent Read Triangle Alert Value/Colour

Post by paul402 »

Having read and obviously misunderstood the documentation I assumed that this would work.

Code: Select all

if (Devices(3732).color== 1) then
but in the error log I get attempt to call a nil value (global 'Devices')
The device number exists.
Any feedback appreciated.
User avatar
waltervl
Posts: 5853
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Dzvent Read Triangle Alert Value/Colour

Post by waltervl »

It should probably something like

Code: Select all

if (domoticz.devices(3732).color== 1) then
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
paul402
Posts: 96
Joined: Monday 23 May 2016 23:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dzvent Read Triangle Alert Value/Colour

Post by paul402 »

Thank you! I have 20 other scripts running ok but I just couldn't see the wood for the trees.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest