bdwilson / hubitat

Hubitat Contributions
18 stars 19 forks source link

OwnTracks - Region/Location and User Data Handler Change [1/2] #5

Closed Cjkeenan closed 3 years ago

Cjkeenan commented 3 years ago

This change uses the data stored from the device's Preferences in its Current State instead of using data stored in the device name or network ID. This allows the name to be changed at will for organizational purposes.

Specifically this change: Add preference to the Device Driver and store it in the Current States

bdwilson commented 3 years ago

Wouldn't I need to to have access to the user & region from the app in order to do the lookup to figure out where to send messages received from the app? Today, I'm using "Region"-"User" and splitting it up, perhaps the best option would be to allow overrides if the user and region attributes are set. How can you access attribute values for a device from an app?

Cjkeenan commented 3 years ago

Yeah this is just part one of two, I edited the files in browser so I have two pull requests instead of them being together as I did not know how to modify two files in one. This pull just creates preferences and stores them in the Current States. The second pull request interfaces that data with the app.