Curious, but it seems to choke on the number field device. When I tried to set the number field using the location/UltraFineDust I couldn’t publish it, but when I changed the device to the virtual text field device I was able to publish it.
Exactly, but it doesn’t write the value to the field.
I have tried it with the UltraFineDustIndex which is an integer and the result is the same. When (for the purpose of testing) I changed the trigger, published and clicked the Execute button in the API browser I get
Digging in a little further I was able to update the textfield device with the value from location/mode, so I think we have some kind of value mismatch.
Yes I’m sure you’re right. I tried using the location / weather attribute and that writes and updates “Clear”, “Cloudy” etc perfectly in the text field.
The question is why location numeric values are not understood. Would like to understand how LocationAttribute that @orangebucket refers to is used
Thanks for your help.
All my encounters with arguments have been based on trial and error and hoping for the best. I never know when I need a type key and whether it should be a JSON type or the type used in the capability. And that’s just with simple arguments. When it comes to including things like device or location attributes I really don’t know what works and what doesn’t. Presumably it depends on what the developers chose to allow, which is anybody’s guess.
But I’m new to rules, so if more experienced users don’t know, I for sure have no idea on syntax for arguments, and the worst is I cannot see any documentation on this. Which is frustrating for anyone, not just me, trying to be a bit creative with rules.
Been having a good look at this and trying using LocationAttribute but I can’t find the way to write to a numerical field, so I’ll tag @nayelyz and @AlejandroPadilla to see if someone can find a moment to look at it and we can get some help.
No hurry, but thanks in advance!
Thanks for your reply Alejandro. I’ve taken a look at the post you mention but it doesn’t help in my case, so I’ll wait for you to find a moment to look at my example. TIA
I’m checking the arguments with the team, also I was checking the rule on this post and I’m no sure about somethings, as far as I saw you are trying to sent a value on the attribute numberFieldOne but I’m no sure about the next.
In my case example Cannot post rules with location capabilities - #20 by Johnnybegoode I am using changes in the value of the location attribute “UltraFineDust” to trigger writing the value of my sensor attribute"fineDustLevel" to numeric field 1, and to write the location attribute “UltraFineDust” to numeric field 2. It triggers perfectly as (if I eliminate the location command to enable me to post the rule) the sensor value continually updates on the numeric field.
The attributes available for location are from the API Reference, found by another contributor earlier in the thread.
“UltraFineDustIndex” is one of these, but to avoid the team having to ask you so many questions we can try with any of these numeric location values, e.g temperature.
To make my question more straightforward, what is the arguments syntax to write any one of these values?
With any sensor device, the syntax is -
How do we write in the case of a location attribute? I´ve tried this but it doesn´t work -
Thank you for the information, after talking with the team we found a bug related it, a report is already created, and as soon as I have an update I will inform you.