mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Adjust precipitation unit in tomorrowio (#82982)
Adjust precipitation_unit in tomorrowio
This commit is contained in:
parent
5599ab6e4a
commit
a12568440d
@ -22,6 +22,7 @@ from homeassistant.const import (
|
|||||||
CONF_API_KEY,
|
CONF_API_KEY,
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
UnitOfLength,
|
UnitOfLength,
|
||||||
|
UnitOfPrecipitationDepth,
|
||||||
UnitOfPressure,
|
UnitOfPressure,
|
||||||
UnitOfSpeed,
|
UnitOfSpeed,
|
||||||
UnitOfTemperature,
|
UnitOfTemperature,
|
||||||
@ -73,7 +74,7 @@ async def async_setup_entry(
|
|||||||
class TomorrowioWeatherEntity(TomorrowioEntity, WeatherEntity):
|
class TomorrowioWeatherEntity(TomorrowioEntity, WeatherEntity):
|
||||||
"""Entity that talks to Tomorrow.io v4 API to retrieve weather data."""
|
"""Entity that talks to Tomorrow.io v4 API to retrieve weather data."""
|
||||||
|
|
||||||
_attr_native_precipitation_unit = UnitOfLength.MILLIMETERS
|
_attr_native_precipitation_unit = UnitOfPrecipitationDepth.MILLIMETERS
|
||||||
_attr_native_pressure_unit = UnitOfPressure.HPA
|
_attr_native_pressure_unit = UnitOfPressure.HPA
|
||||||
_attr_native_temperature_unit = UnitOfTemperature.CELSIUS
|
_attr_native_temperature_unit = UnitOfTemperature.CELSIUS
|
||||||
_attr_native_visibility_unit = UnitOfLength.KILOMETERS
|
_attr_native_visibility_unit = UnitOfLength.KILOMETERS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user