On event from (with variable device)


#1

1) Give a description of the problem
I have a variable device with my physical device name
Example: device vDeviceFan = Master Bedroom Fan
My device has property fanSpeed
I would like to use with my event the device vDeviceFan

2) What is the expected behaviour?
If I select physical device in on event from “vDeviceFan” I can’t access the property fanSpeed
If I use physical device “Master Bedroom Fan” I don’t have problem and I can chose this property from the drop down list
Example:
on event from
Master Bedroom Fan’s fanSpeed

Usually in any other part of the code like switch etc … I can just write the code manually as expression but here I can’t do it I have to only pick from the drop down list

Any suggestion have can I access this property (fanSpeed) if I use device as device variable?

Thanks a bunch


#2

Select them both the variable and the physical, select the fanSpeed then remove the physical device from the selection.


#3

Yes that is what I usually do in any other triggers but this doesn’t work here :frowning:
image
image
image


#4

Ah I see what you’r saying now. I was thinking of Tasks, not the attributes.


#5

Yes I just wish I could write it in expression or in variable or something

I just need to get
on event from
{physicalFan}’s fanSpeed

So far I didn’t figure out how to trick the system :slight_smile:


#6

In debug I can get value from fanSpeed even if I use device variable
So I know it would work if there is way to write it in expression :frowning:

image


#7

Have you tried to trick it with an IF (as Expression)?

If [pyhysicalFan:fanSpeed] changes...


#8

Sorry I meant if I could use expression in “on event from”
The only options are Physical device, Virtual Device and variable
But I did not figure out what is the variable from as there is no list of my variables if I choose it
Not sure if I somehow could trick the system to use variable to pass in {physicalFan}’s fanSpeed



#9

For now I use level property and that works but would be nice to use fanSpeed :slight_smile:


#10

From my experience, the drop down choices with a tiny house on the left can not be used as triggers.

temp

If someone finds a way to do this, please share it here.


#11

In my case it works great if I select the physical fan switch. It disappear only if I use variable “device” for the physical switch


#12

That’s what I mean… The “switch” works great as a trigger (no house icon), but the “fanSpeed(with the icon) is usually only for conditional checks. They don’t actually trigger the piston.
(you can blame the Device Handler)