* Migrate from entry unique id to emoncms unique id * Use a placeholder for the documentation URL * Use async_set_unique_id in config_flow * use _abort_if_unique_id_configured in config_flow * Avoid single-use variable Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> * Add async_migrate_entry * Remove commented code * Downgrade version if user add server without uuid * Improve code quality * Move code migrating HA to emoncms uuid to init * Fit doc url in less than 88 chars Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> * Improve code quality * Only update unique_id with async_update_entry Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> * Make emoncms_client compulsory to get_feed_list * Improve readability with unique id functions * Rmv test to give more sense to _migrate_unique_id --------- Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
19 lines
462 B
Python
19 lines
462 B
Python
"""Constants for the emoncms integration."""
|
|
|
|
import logging
|
|
|
|
CONF_EXCLUDE_FEEDID = "exclude_feed_id"
|
|
CONF_ONLY_INCLUDE_FEEDID = "include_only_feed_id"
|
|
CONF_MESSAGE = "message"
|
|
CONF_SUCCESS = "success"
|
|
DOMAIN = "emoncms"
|
|
EMONCMS_UUID_DOC_URL = (
|
|
"https://docs.openenergymonitor.org/emoncms/update.html"
|
|
"#upgrading-to-a-version-producing-a-unique-identifier"
|
|
)
|
|
FEED_ID = "id"
|
|
FEED_NAME = "name"
|
|
FEED_TAG = "tag"
|
|
|
|
|
|
LOGGER = logging.getLogger(__package__)
|