Use core constants for bmw_connected_drive (#46042)

pull/46062/head
tkdrob 2021-02-05 08:02:28 -05:00 committed by GitHub
parent e01ca40d56
commit 9a570d7c32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 6 deletions

View File

@ -12,6 +12,7 @@ from homeassistant.const import (
ATTR_ATTRIBUTION, ATTR_ATTRIBUTION,
CONF_NAME, CONF_NAME,
CONF_PASSWORD, CONF_PASSWORD,
CONF_REGION,
CONF_USERNAME, CONF_USERNAME,
) )
from homeassistant.core import HomeAssistant, callback from homeassistant.core import HomeAssistant, callback
@ -28,7 +29,6 @@ from .const import (
CONF_ACCOUNT, CONF_ACCOUNT,
CONF_ALLOWED_REGIONS, CONF_ALLOWED_REGIONS,
CONF_READ_ONLY, CONF_READ_ONLY,
CONF_REGION,
CONF_USE_LOCATION, CONF_USE_LOCATION,
DATA_ENTRIES, DATA_ENTRIES,
DATA_HASS_CONFIG, DATA_HASS_CONFIG,

View File

@ -6,11 +6,11 @@ from bimmer_connected.country_selector import get_region_from_name
import voluptuous as vol import voluptuous as vol
from homeassistant import config_entries, core, exceptions from homeassistant import config_entries, core, exceptions
from homeassistant.const import CONF_PASSWORD, CONF_SOURCE, CONF_USERNAME from homeassistant.const import CONF_PASSWORD, CONF_REGION, CONF_SOURCE, CONF_USERNAME
from homeassistant.core import callback from homeassistant.core import callback
from . import DOMAIN # pylint: disable=unused-import from . import DOMAIN # pylint: disable=unused-import
from .const import CONF_ALLOWED_REGIONS, CONF_READ_ONLY, CONF_REGION, CONF_USE_LOCATION from .const import CONF_ALLOWED_REGIONS, CONF_READ_ONLY, CONF_USE_LOCATION
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)

View File

@ -1,7 +1,6 @@
"""Const file for the BMW Connected Drive integration.""" """Const file for the BMW Connected Drive integration."""
ATTRIBUTION = "Data provided by BMW Connected Drive" ATTRIBUTION = "Data provided by BMW Connected Drive"
CONF_REGION = "region"
CONF_ALLOWED_REGIONS = ["china", "north_america", "rest_of_world"] CONF_ALLOWED_REGIONS = ["china", "north_america", "rest_of_world"]
CONF_READ_ONLY = "read_only" CONF_READ_ONLY = "read_only"
CONF_USE_LOCATION = "use_location" CONF_USE_LOCATION = "use_location"

View File

@ -5,10 +5,9 @@ from homeassistant import config_entries, data_entry_flow
from homeassistant.components.bmw_connected_drive.config_flow import DOMAIN from homeassistant.components.bmw_connected_drive.config_flow import DOMAIN
from homeassistant.components.bmw_connected_drive.const import ( from homeassistant.components.bmw_connected_drive.const import (
CONF_READ_ONLY, CONF_READ_ONLY,
CONF_REGION,
CONF_USE_LOCATION, CONF_USE_LOCATION,
) )
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.const import CONF_PASSWORD, CONF_REGION, CONF_USERNAME
from tests.common import MockConfigEntry from tests.common import MockConfigEntry