Use f-strings in integrations starting with "H" - "L" (#32265)

* Use f-strings in integrations starting with "H"

* Use f-strings in integrations starting with "I"

* Use f-strings in integrations starting with "J"

* Use f-strings in integrations starting with "K"

* Use f-strings in integrations starting with "L"

* Fix lint error

* Use join instead of f-string in homekit_controller

* Use local variables with f-strings

* Fix lint error

* Escape the characters in f-string

* Sort imports with isort in homeworks light

* Fix pylint error

* Fix broken tests

* Fix broken tests v2
This commit is contained in:
springstan authored and GitHub committed 2020-02-28 12:39:29 +01:00
1 parent 7714160f4c
commit 157f972d72
77 files changed
+158 -246

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
"""Support for IHC switches."""
from homeassistant.components.switch import SwitchDevice
from . import IHC_CONTROLLER, IHC_DATA, IHC_INFO
from . import IHC_CONTROLLER, IHC_INFO
from .const import CONF_OFF_ID, CONF_ON_ID
from .ihcdevice import IHCDevice
from .util import async_pulse, async_set_bool
@@ -18,7 +18,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
product = device["product"]
# Find controller that corresponds with device id
ctrl_id = device["ctrl_id"]
ihc_key = IHC_DATA.format(ctrl_id)
ihc_key = f"ihc{ctrl_id}"
info = hass.data[ihc_key][IHC_INFO]
ihc_controller = hass.data[ihc_key][IHC_CONTROLLER]
ihc_off_id = product_cfg.get(CONF_OFF_ID)