Clean up Lutron Caseta (#47534)

This commit is contained in:
tkdrob 2021-03-07 08:14:15 -05:00 committed by GitHub
parent 4018d0a152
commit 07fd1b3b43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 0 additions and 12 deletions

View file

@ -67,7 +67,6 @@ PLATFORMS = ["light", "switch", "cover", "scene", "fan", "binary_sensor"]
async def async_setup(hass, base_config):
"""Set up the Lutron component."""
hass.data.setdefault(DOMAIN, {})
if DOMAIN in base_config:
@ -92,7 +91,6 @@ async def async_setup(hass, base_config):
async def async_setup_entry(hass, config_entry):
"""Set up a bridge from a config entry."""
host = config_entry.data[CONF_HOST]
keyfile = hass.config.path(config_entry.data[CONF_KEYFILE])
certfile = hass.config.path(config_entry.data[CONF_CERTFILE])
@ -280,7 +278,6 @@ def _async_subscribe_pico_remote_events(hass, lip, button_devices_by_id):
async def async_unload_entry(hass, config_entry):
"""Unload the bridge bridge from a config entry."""
data = hass.data[DOMAIN][config_entry.entry_id]
data[BRIDGE_LEAP].close()
if data[BRIDGE_LIP]:

View file

@ -16,7 +16,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
Adds occupancy groups from the Caseta bridge associated with the
config_entry as binary_sensor entities.
"""
entities = []
data = hass.data[CASETA_DOMAIN][config_entry.entry_id]
bridge = data[BRIDGE_LEAP]

View file

@ -171,7 +171,6 @@ class LutronCasetaFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
This flow is triggered by `async_setup`.
"""
host = import_info[CONF_HOST]
# Store the imported config for other steps in this flow to access.
self.data[CONF_HOST] = host
@ -213,7 +212,6 @@ class LutronCasetaFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
async def async_validate_connectable_bridge_config(self):
"""Check if we can connect to the bridge with the current config."""
bridge = None
try:

View file

@ -31,7 +31,6 @@ ATTR_ACTION = "action"
ACTION_PRESS = "press"
ACTION_RELEASE = "release"
CONF_TYPE = "type"
CONF_SUBTYPE = "subtype"
BRIDGE_TIMEOUT = 35

View file

@ -24,7 +24,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
Adds shades from the Caseta bridge associated with the config_entry as
cover entities.
"""
entities = []
data = hass.data[CASETA_DOMAIN][config_entry.entry_id]
bridge = data[BRIDGE_LEAP]

View file

@ -25,7 +25,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
Adds fan controllers from the Caseta bridge associated with the config_entry
as fan entities.
"""
entities = []
data = hass.data[CASETA_DOMAIN][config_entry.entry_id]
bridge = data[BRIDGE_LEAP]

View file

@ -33,7 +33,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
Adds dimmers from the Caseta bridge associated with the config_entry as
light entities.
"""
entities = []
data = hass.data[CASETA_DOMAIN][config_entry.entry_id]
bridge = data[BRIDGE_LEAP]

View file

@ -12,7 +12,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
Adds scenes from the Caseta bridge associated with the config_entry as
scene entities.
"""
entities = []
data = hass.data[CASETA_DOMAIN][config_entry.entry_id]
bridge = data[BRIDGE_LEAP]

View file

@ -15,7 +15,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
Adds switches from the Caseta bridge associated with the config_entry as
switch entities.
"""
entities = []
data = hass.data[CASETA_DOMAIN][config_entry.entry_id]
bridge = data[BRIDGE_LEAP]