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
@@ -58,7 +58,7 @@ class StreamlabsAwayMode(BinarySensorDevice):
@property
def name(self):
"""Return the name for away mode."""
return "{} {}".format(self._location_name, NAME_AWAY_MODE)
return f"{self._location_name} {NAME_AWAY_MODE}"
@property
def is_on(self):
@@ -79,7 +79,7 @@ class StreamLabsDailyUsage(Entity):
@property
def name(self):
"""Return the name for daily usage."""
return "{} {}".format(self._location_name, NAME_DAILY_USAGE)
return f"{self._location_name} {NAME_DAILY_USAGE}"
@property
def icon(self):
@@ -107,7 +107,7 @@ class StreamLabsMonthlyUsage(StreamLabsDailyUsage):
@property
def name(self):
"""Return the name for monthly usage."""
return "{} {}".format(self._location_name, NAME_MONTHLY_USAGE)
return f"{self._location_name} {NAME_MONTHLY_USAGE}"
@property
def state(self):
@@ -121,7 +121,7 @@ class StreamLabsYearlyUsage(StreamLabsDailyUsage):
@property
def name(self):
"""Return the name for yearly usage."""
return "{} {}".format(self._location_name, NAME_YEARLY_USAGE)
return f"{self._location_name} {NAME_YEARLY_USAGE}"
@property
def state(self):