Use strings instead of f-strings for constants (#40619)

This commit is contained in:
springstan 2020-11-09 10:09:53 +01:00 committed by GitHub
parent c8a940c59f
commit 30b94892c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 91 additions and 75 deletions

View file

@ -32,10 +32,10 @@ from homeassistant.const import (
LENGTH_KILOMETERS,
LENGTH_MILLIMETERS,
PERCENTAGE,
PRECIPITATION_MILLIMETERS_PER_HOUR,
PRESSURE_HPA,
SPEED_KILOMETERS_PER_HOUR,
TEMP_CELSIUS,
TIME_HOURS,
)
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
@ -85,13 +85,13 @@ SENSOR_TYPES = {
"windgust": ["Wind gust", SPEED_KILOMETERS_PER_HOUR, "mdi:weather-windy"],
"precipitation": [
"Precipitation",
f"{LENGTH_MILLIMETERS}/{TIME_HOURS}",
PRECIPITATION_MILLIMETERS_PER_HOUR,
"mdi:weather-pouring",
],
"irradiance": ["Irradiance", IRRADIATION_WATTS_PER_SQUARE_METER, "mdi:sunglasses"],
"precipitation_forecast_average": [
"Precipitation forecast average",
f"{LENGTH_MILLIMETERS}/{TIME_HOURS}",
PRECIPITATION_MILLIMETERS_PER_HOUR,
"mdi:weather-pouring",
],
"precipitation_forecast_total": [