1
0
mirror of https://github.com/home-assistant/core.git synced 2026-06-02 21:54:27 +01:00

Use literal string interpolation in integrations R-S (f-strings) (#26392)

This commit is contained in:
Franck Nijhof
2019-09-03 21:14:39 +02:00
committed by Pascal Vizeli
parent 7203027cbf
commit 445c741b30
69 changed files with 129 additions and 149 deletions
@@ -116,7 +116,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
poss_id = slugify(poss_dev.event.device.id_string.lower())
_LOGGER.debug("Found possible matching device ID: %s", poss_id)
pkt_id = "".join("{0:02x}".format(x) for x in event.data)
pkt_id = "".join(f"{x:02x}" for x in event.data)
sensor = RfxtrxBinarySensor(event, pkt_id)
sensor.hass = hass
rfxtrx.RFX_DEVICES[device_id] = sensor