Custom Attribute: boolean has no comparators

I'm trying to test the state of the attribute chime in this device:

image

But in RM, there's no way to pick "is true/false" when I select the attribute from the dropdown:

Now, here's the extra-funny part: if I choose other attributes from the list for awhile, I can get RM to treat chime like different types of variables...

Recorded GIF: Imgur

Any ideas?

1 Like

What device is this? How was the attribute "chime" defined? Chances are it was incorrectly defined as something that doesn't exist or maybe boolean isn't working. I couldn't find an example of it anywhere on a google 'site:github.com "hubitat" "bool" "attribute"' search.

I most often see attributes defined as type "string", "enum", or "number" but "bool" should work according to this.

https://docs.hubitat.com/index.php?title=Attribute_Object

BOOL is not implemented in RM for Custom Attribute. I will take a look at adding it.

6 Likes

I see, thanks!

I switched the driver to use an enum and the rule works fine now.

1 Like

I thought a screwed something up... was looking for this same functionality.

I was about to enter a similar issue, restoring an device from a variable. Jump up store, store sound device volume & mute state into local vars,
Set Volume to TV Room volume
Set Sound to TV Room mute
This works as expected, but RM does not allow setting attribute from the vars..
Thx

OK, old thread. What are you wanting? The previous solution was to use an enum for Boolean values instead of BOOL.

That worked. I was writing a driver and when testing the rule was blank for the bool. I spent some time trying to figure out what I did wrong. Then came here and found the answer. I changed to enum and all is well.

+1 bump

same wall. same work around

"enum", ["true","false"]

impressive work keep it up!
thanks

bug?hlp

I changed driver to

    attribute "alert_pm25", "enum", ["true","false"]

but still all the comparison in RM come up (null) or (?)

My issue -> fixed -> RM enum ? / Null

I had to delete the device and re-add it.
The it took perfect.

Thanks!

[2.2.4.158] C-7

Did this get changed? Are bool's not allowed in Custom Attributes?

This is an old thread so I'm guessing it was change somewhere but I seem to be having the same issue with bool Custom Attributes in RM

John

Boolean is not a supported type for an attribute in a driver, as far as I know. RM asks the driver of the custom attribute device for its supported attributes, so it won't return Boolean. I'll have to check on this tomorrow, but that's what I think is going on. RM itself doesn't know what the attributes are, only what the driver tells it.

I was able to get RM to select a attribute that was a bool (before I know...no bool)

see this; Stalled when selecting custom attribute but it wouldn't allow me to go any further.

John

You can select an attribute from the drop down list in RM if it exists but if it's unsupported you can't do anything with it.