codersaur/SmartThings

Generic sensor attributes

Opened this issue · 2 comments

Thanks for writing this! I have an issue with a custom device handler I've written that doesn't have any capabilities beyond "sensor" - it's an oil tank monitor that just reports the number of gallons in the tank. I have defined a custom attribute, "gallons" that I would like to monitor.

Currently, I've just hacked the pressureSensor type (which you've mapped to sensor) to include my custom attribute, but I was wondering if it were possible to allow the discovery and/or selection of non-standard attributes in devices with "sensor" capability?

Here's a link to the code if I haven't been clear about what I'm asking:

https://github.com/dlaporte/SmartThings/blob/master/DeviceHandlers/rollie-gauge/rollie-gauge.groovy

thanks!

I'm assuming this relates to the InfluxDB Logger. It's a good suggestion, but not something I will get round to coding any time soon tbh. If you want to monitor a custom attribute, I recommend editing the code yourself; there are a few places you need to edit the code but it's fairly easy to see where.

Also, for tank capacity, keep an eye on this thread: https://community.smartthings.com/t/capability-volumemeter/40970