1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use literal string interpolation in integrations B-D (f-strings) (#26378)

This commit is contained in:
Franck Nijhof
2019-09-03 17:09:59 +02:00
committed by Pascal Vizeli
parent 105461edb5
commit 6a24d893c8
52 changed files with 116 additions and 126 deletions

View File

@@ -45,9 +45,9 @@ class DoorBirdSwitch(SwitchDevice):
def name(self):
"""Return the name of the switch."""
if self._relay == IR_RELAY:
return "{} IR".format(self._doorstation.name)
return f"{self._doorstation.name} IR"
return "{} Relay {}".format(self._doorstation.name, self._relay)
return f"{self._doorstation.name} Relay {self._relay}"
@property
def icon(self):