mirror of
https://github.com/elisspace/core.git
synced 2026-10-05 16:56:19 +00:00
Use literal string interpolation in integrations R-S (f-strings) (#26392)
This commit is contained in:
committed by
Pascal Vizeli
parent
7203027cbf
commit
445c741b30
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user