java.lang.IllegalArgumentException: Property 'Aeon Multisensor' too ambiguous for this device @ line 1686
This is the code at line 1686
if (settings.D_motion.latestValue.contains("active"))
Basically looking up a list of motion sensors to see if the list contains an active motion sensor…
It works fine for my smartness motion sensors… anyone know what could be going on here? Its like it can’t find the last value for a few of my motions sensors but can for others?
D_motion is a list?, if so suspecting that all the names are the same, so it can’t figure out which latest value to fetch. Maybe try?
settings.D_motion.each(){ it ->
//what the heck are you complaining about?
}
The problem is you’re using latestValue without the attribute you’re looking for, latestValue("motion"). That poorly worded error is complaining that for the multisensor it doesn’t know which latest value you want.
This works fine for devices that have only one value to report but for multi sensors it seems to fail. Basically from a group/list of motion sensors I need to be able to see if the last motion event was “active” or “inactive”. All help is appreciated
I could understand if it was saying “active” is too ambiguous… but why is the sensor type being mentioned here? lol
I just tried looking for “motion.active” and that didn’t work either.
if (settings.D_motion.latestValue.contains("motion")) is not working either.
I’m curious about the question that @Mike_Maxwell raised: is settings.D_motion a list of motion sensors or a single object representing a set? Calling latestValue() on a list doesn’t work, does it? On a single device, the value will be returned and contains() would be evaluating whether “active” is a substring of the latestValue for that single device. So virtual device returning an array of values for the lastestValues of its children or single device where you expect to have a list?