Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/skykettle-ha.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-08-13 12:38:39 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-08-13 12:38:39 +0300
commit02dcc27bdd4d3bae46aef63fb659ea61d85bdaa1 (patch)
tree919ab350b53707682cbacfed5c61dd4489e6c57e
parent9840006c0e657ac36c4e0d8759d3eeeae01660ec (diff)
backward compatibility code removed
-rw-r--r--custom_components/skykettle/__init__.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/custom_components/skykettle/__init__.py b/custom_components/skykettle/__init__.py
index 0506862..deb38bf 100644
--- a/custom_components/skykettle/__init__.py
+++ b/custom_components/skykettle/__init__.py
@@ -29,15 +29,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
if DOMAIN not in hass.data: hass.data[DOMAIN] = {}
if entry.entry_id not in hass.data: hass.data[DOMAIN][entry.entry_id] = {}
- # Backward compatibility
- if (CONF_FRIENDLY_NAME in entry.data
- and not SkyKettle.get_model_code(entry.data[CONF_FRIENDLY_NAME])
- and SkyKettle.get_model_code(entry.data[CONF_FRIENDLY_NAME] + 'S')):
- config = dict(entry.data.items())
- config[CONF_FRIENDLY_NAME] = config[CONF_FRIENDLY_NAME] + 'S'
- hass.config_entries.async_update_entry(entry, data=config)
- _LOGGER.info(f"Fixed invalid model name: {config[CONF_FRIENDLY_NAME][:-1]} -> {config[CONF_FRIENDLY_NAME]}")
-
kettle = KettleConnection(
mac=entry.data[CONF_MAC],
key=entry.data[CONF_PASSWORD],