jason0x43 / hacs-hubitat

A Hubitat integration for Home Assistant
MIT License
198 stars 48 forks source link

Don't use hub access token directly in IDs #181

Open jason0x43 opened 2 years ago

jason0x43 commented 2 years ago

The hub access token is used to uniquely identify an instance of the Maker API to the integration. However, this means the access token can't be easily changed. Ideally, an integration instance should have a random unique ID, and should store the associated Maker API access token as a separate piece of configuration data.

jason0x43 commented 1 year ago

While I'm thinking of it: existing installs will need to copy the token value to a new "id" property in the config flow data. New installs will generate a random value for the id. The hub token will be associated with the config flow, but won't be used directly for device IDs (the new "id" property will).