mirror of https://github.com/home-assistant/core
Remove unecessary variable in control4 (#90176)
Remove unecessary expiration value
This commit is contained in:
parent
d5f949f4d8
commit
504793882d
|
@ -35,7 +35,6 @@ from .const import (
|
|||
CONF_DIRECTOR_ALL_ITEMS,
|
||||
CONF_DIRECTOR_MODEL,
|
||||
CONF_DIRECTOR_SW_VERSION,
|
||||
CONF_DIRECTOR_TOKEN_EXPIRATION,
|
||||
DEFAULT_SCAN_INTERVAL,
|
||||
DOMAIN,
|
||||
)
|
||||
|
@ -79,7 +78,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
config[CONF_HOST], director_token_dict[CONF_TOKEN], director_session
|
||||
)
|
||||
entry_data[CONF_DIRECTOR] = director
|
||||
entry_data[CONF_DIRECTOR_TOKEN_EXPIRATION] = director_token_dict["token_expiration"]
|
||||
|
||||
# Add Control4 controller to device registry
|
||||
controller_href = (await account.getAccountControllers())["href"]
|
||||
|
|
|
@ -7,7 +7,6 @@ MIN_SCAN_INTERVAL = 1
|
|||
|
||||
CONF_ACCOUNT = "account"
|
||||
CONF_DIRECTOR = "director"
|
||||
CONF_DIRECTOR_TOKEN_EXPIRATION = "director_token_expiry"
|
||||
CONF_DIRECTOR_SW_VERSION = "director_sw_version"
|
||||
CONF_DIRECTOR_MODEL = "director_model"
|
||||
CONF_DIRECTOR_ALL_ITEMS = "director_all_items"
|
||||
|
|
|
@ -10,13 +10,7 @@ from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_TOKEN, CONF_USERN
|
|||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import aiohttp_client
|
||||
|
||||
from .const import (
|
||||
CONF_ACCOUNT,
|
||||
CONF_CONTROLLER_UNIQUE_ID,
|
||||
CONF_DIRECTOR,
|
||||
CONF_DIRECTOR_TOKEN_EXPIRATION,
|
||||
DOMAIN,
|
||||
)
|
||||
from .const import CONF_ACCOUNT, CONF_CONTROLLER_UNIQUE_ID, CONF_DIRECTOR, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -53,10 +47,8 @@ async def refresh_tokens(hass: HomeAssistant, entry: ConfigEntry):
|
|||
director = C4Director(
|
||||
config[CONF_HOST], director_token_dict[CONF_TOKEN], director_session
|
||||
)
|
||||
director_token_expiry = director_token_dict["token_expiration"]
|
||||
|
||||
_LOGGER.debug("Saving new tokens in hass data")
|
||||
entry_data = hass.data[DOMAIN][entry.entry_id]
|
||||
entry_data[CONF_ACCOUNT] = account
|
||||
entry_data[CONF_DIRECTOR] = director
|
||||
entry_data[CONF_DIRECTOR_TOKEN_EXPIRATION] = director_token_expiry
|
||||
|
|
Loading…
Reference in New Issue