How to read a sensor with a homey script

Yes, you’re right :woozy_face:

Have you assigned the correct “plugged in” value to the Hue socket? You can do so from the device settings in the mobile app.

Yes, I even checked in the device class and it is returning virtual class light, but strange enough if I check for the virtual class it returns nothing.
Checking class and virtual class of specific lamp (connected to socket):
image

Then comparing the virtual class doesn’t show the lamp, so I must be doing something wrong:

while checking for class light returns fine:

duh…, already found the issue…it must be virtualClass instead of virtualclass, I already changed it in the first statement this morning but there were no lights with virtual class active that time so I didn’t notice the difference. But now in the second script I did…
image

1 Like

Maybe you type too fast :crazy_face:
It gets hinted often ( I don’t dare to say ‘always’ hehe):
Screenshot from 2024-03-13 10-52-07

Yeah I need to read back what I have typed first before complaining :slight_smile: but my first script works now:


Makes it much easier than using 3 then cards for every hue light:
image
Maybe I will try to add a possibility to set all the lights in a specific group too, saves a few more then cards…