Device Attribute Value

I have a Centralite temperature/humidity sensor that was recognized as a Smartthings Humidity sensor.

I'm trying to save the value in the temperate parameter to a variable in Rules Machine to use later.

When I go to "Set Mode, Variable, Or File...." / Set Variable / / Device Attribute / Device, however, there are no attributes available to select.

Any suggestions? Do I need to change the device type?

TIA

Wouldn't it just be easier to create a global variable (string) pointing to the attribute(s)?

Did you look under the custom attribute options?

I'm using the "Rule Machine" app and don't see the ability to create a global variable on the first screen like I do for the "Rule Machine Legacy" app; should it be showing?

Sorry - where would I find the custom attribute options? Should that be under the variable definition or the device? (Not seeing it under either but could be missing it?)

Thanks

When you create your rule you will see the local variable button

Then define it

You'll find custom attributes under trigger conditions of a new rule

It does show under the trigger conditions but I'd like to use the value in the actions and don't see it there, nor how I can assign it to a variable.

Sorry for being so dense - I'm sure it's simple and I'm totally missing it. :slight_smile:

The first thing you will need to do is to ensure you have a Global or Local variable created (See @rlithgow1’s post above for the steps to create a local variable).

Then, you can fill-in the variable value with the device’s temperature under “Select Actions to Run” by selecting:

Does that help?

What I don't understand is that I under the "Rule Machine Legacy" I can associate the sensor's temperature value to a variable, but under "Rule Machine" I don't see that option.

Is the driver for the device a custom driver? I ask because some variables are not properly defined in custom drivers and that can cause this type of issue.

Can you provide a link to the driver if it is custom?

No, it's not a custom driver. The device is a Centralite temperature/humidity sensor that was recognized as a Smartthings Humidity sensor. Think I should try removing the device and adding again?

No need to remove it.

If it is a built-in driver, it is possible that it is something that @bravenel would need to look into.

Okay, could be something I'm doing wrong; RM Legacy is working for some reason.

Appreciate everyone's help - will wait to hear from @bravenel.

Thanks :slight_smile:

I'll look into it.

This works for me. What kind of variable is that?

Try something for me as a test: Start a Condition Action (IF-THEN), and for the first Condition, select 'Custom Attribute'. Select the same device (Back Porch Temp Humidity Sensor). See what attributes it offers you in the pull down for that. Perhaps post of screenshot of that pull down.

When I try that the attribute (temperature) does show @bravenel. Perhaps I'm defining the variable wrong? It's a local variable. Looking back at @rlithgow1's post I see the variable is set with a value = "definedeviceattribute". Is that the actual literal value it should be set to or do I set it to something related to the device?

To get temperature, it needs to be a Number or Decimal variable.

1 Like

Whoops - totally missed that. Sorry.

Appreciate the help everyone.

1 Like