Hi all.
I've attempted to butcher a bit of existing code and have failed.
I was hoping someone may be able to provide the code for a device which could have:
- a switch
- several areas for "strings"
- ditto for number, time, date
Ideally the driver should allow the above to be manually set, but would be created with default figures when a new device.
Cheers!
A long time ago I wrote a Dynamic Attribute driver (https://raw.githubusercontent.com/thebearmay/hubitat/main/dynAttribute.groovy) that you could add Switch Capability to fairly easy if you like.
2 Likes
Thanks for the reply. However, this is really confusing me:
Looks like you’ve stored at least 4 Keys with Values. attrRet is a temporary workspace normally used to return the value from a Get request on a Key, but when you store a new key it returns a JSON string of all keys that have been stored.
Also from the great @thebearmay, is the Custom Note app that might be what you are looking for. I use it to set Battery type and another Battery Change Date on my devices to keep track and learn how long they typically last.
1 Like