Use strings instead of f-strings for constants (#40619)
This commit is contained in:
parent
c8a940c59f
commit
30b94892c4
12 changed files with 91 additions and 75 deletions
|
@ -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": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue