Use f-strings in integrations starting with "M" (#32271)
* Use f-strings in integrations starting with "M" * Format mqtt light init with black * Fix lint error * Fix pylint error * Restore constants * Update homeassistant/components/mqtt/discovery.py * Update homeassistant/components/mqtt/discovery.py * Update homeassistant/components/mqtt/discovery.py * Update homeassistant/components/mqtt/discovery.py * Format with Black
This commit is contained in:
1 parent
bbe0f75336
commit
ba0aaeeddb
34 files changed
+62
-80
No files matched your search
@@ -9,7 +9,6 @@ HOME_LOCATION_NAME = "Home"
|
||||
|
||||
CONF_TRACK_HOME = "track_home"
|
||||
|
||||
ENTITY_ID_SENSOR_FORMAT = WEATHER_DOMAIN + ".met_{}"
|
||||
ENTITY_ID_SENSOR_FORMAT_HOME = ENTITY_ID_SENSOR_FORMAT.format(HOME_LOCATION_NAME)
|
||||
ENTITY_ID_SENSOR_FORMAT_HOME = f"{WEATHER_DOMAIN}.met_{HOME_LOCATION_NAME}"
|
||||
|
||||
_LOGGER = logging.getLogger(".")
|
||||
@@ -168,7 +168,7 @@ class MetWeather(WeatherEntity):
|
||||
if self.track_home:
|
||||
return "home"
|
||||
|
||||
return "{}-{}".format(self._config[CONF_LATITUDE], self._config[CONF_LONGITUDE])
|
||||
return f"{self._config[CONF_LATITUDE]}-{self._config[CONF_LONGITUDE]}"
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
||||
Reference in new issue
Block a user