Use f-strings in integrations starting with "F"and"G" (#32150)
* Use f-strings in integrations starting with F * Use f-strings in tests for integrations starting with F * Use f-strings in integrations starting with G * Use f-strings in tests for integrations starting with G * Fix pylint error * Fix broken test
This commit is contained in:
1 parent
496bd3dddf
commit
ad102b3840
59 files changed
+219
-344
No files matched your search
@@ -78,9 +78,9 @@ class FritzboxSwitch(SwitchDevice):
|
||||
attrs[ATTR_STATE_LOCKED] = self._device.lock
|
||||
|
||||
if self._device.has_powermeter:
|
||||
attrs[ATTR_TOTAL_CONSUMPTION] = "{:.3f}".format(
|
||||
(self._device.energy or 0.0) / 1000
|
||||
)
|
||||
attrs[
|
||||
ATTR_TOTAL_CONSUMPTION
|
||||
] = f"{((self._device.energy or 0.0) / 1000):.3f}"
|
||||
attrs[ATTR_TOTAL_CONSUMPTION_UNIT] = ATTR_TOTAL_CONSUMPTION_UNIT_VALUE
|
||||
if self._device.has_temperature_sensor:
|
||||
attrs[ATTR_TEMPERATURE] = str(
|
||||
|
||||
Reference in new issue
Block a user