Use literal string interpolation in integrations T-W (f-strings) (#26394)
This commit is contained in:
parent
cde09062c4
commit
ef0e9431b6
50 changed files with 128 additions and 132 deletions
|
@ -96,12 +96,12 @@ class WorldTidesInfoSensor(Entity):
|
|||
tidetime = time.strftime(
|
||||
"%I:%M %p", time.localtime(self.data["extremes"][0]["dt"])
|
||||
)
|
||||
return "High tide at {}".format(tidetime)
|
||||
return f"High tide at {tidetime}"
|
||||
if "Low" in str(self.data["extremes"][0]["type"]):
|
||||
tidetime = time.strftime(
|
||||
"%I:%M %p", time.localtime(self.data["extremes"][0]["dt"])
|
||||
)
|
||||
return "Low tide at {}".format(tidetime)
|
||||
return f"Low tide at {tidetime}"
|
||||
return None
|
||||
return None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue