mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Add/Modify tomorrow.io sensor entity icons (#98648)
This commit is contained in:
parent
41db088f5d
commit
78f0d8bc9c
@ -118,6 +118,7 @@ SENSOR_TYPES = (
|
|||||||
TomorrowioSensorEntityDescription(
|
TomorrowioSensorEntityDescription(
|
||||||
key=TMRW_ATTR_DEW_POINT,
|
key=TMRW_ATTR_DEW_POINT,
|
||||||
name="Dew Point",
|
name="Dew Point",
|
||||||
|
icon="mdi:thermometer-water",
|
||||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
),
|
),
|
||||||
@ -142,6 +143,7 @@ SENSOR_TYPES = (
|
|||||||
TomorrowioSensorEntityDescription(
|
TomorrowioSensorEntityDescription(
|
||||||
key=TMRW_ATTR_CLOUD_BASE,
|
key=TMRW_ATTR_CLOUD_BASE,
|
||||||
name="Cloud Base",
|
name="Cloud Base",
|
||||||
|
icon="mdi:cloud-arrow-down",
|
||||||
unit_imperial=UnitOfLength.MILES,
|
unit_imperial=UnitOfLength.MILES,
|
||||||
unit_metric=UnitOfLength.KILOMETERS,
|
unit_metric=UnitOfLength.KILOMETERS,
|
||||||
imperial_conversion=lambda val: DistanceConverter.convert(
|
imperial_conversion=lambda val: DistanceConverter.convert(
|
||||||
@ -154,6 +156,7 @@ SENSOR_TYPES = (
|
|||||||
TomorrowioSensorEntityDescription(
|
TomorrowioSensorEntityDescription(
|
||||||
key=TMRW_ATTR_CLOUD_CEILING,
|
key=TMRW_ATTR_CLOUD_CEILING,
|
||||||
name="Cloud Ceiling",
|
name="Cloud Ceiling",
|
||||||
|
icon="mdi:cloud-arrow-up",
|
||||||
unit_imperial=UnitOfLength.MILES,
|
unit_imperial=UnitOfLength.MILES,
|
||||||
unit_metric=UnitOfLength.KILOMETERS,
|
unit_metric=UnitOfLength.KILOMETERS,
|
||||||
imperial_conversion=lambda val: DistanceConverter.convert(
|
imperial_conversion=lambda val: DistanceConverter.convert(
|
||||||
@ -165,12 +168,14 @@ SENSOR_TYPES = (
|
|||||||
TomorrowioSensorEntityDescription(
|
TomorrowioSensorEntityDescription(
|
||||||
key=TMRW_ATTR_CLOUD_COVER,
|
key=TMRW_ATTR_CLOUD_COVER,
|
||||||
name="Cloud Cover",
|
name="Cloud Cover",
|
||||||
|
icon="mdi:cloud-percent",
|
||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
),
|
),
|
||||||
# Data comes in as m/s, convert to mi/h for imperial
|
# Data comes in as m/s, convert to mi/h for imperial
|
||||||
TomorrowioSensorEntityDescription(
|
TomorrowioSensorEntityDescription(
|
||||||
key=TMRW_ATTR_WIND_GUST,
|
key=TMRW_ATTR_WIND_GUST,
|
||||||
name="Wind Gust",
|
name="Wind Gust",
|
||||||
|
icon="mdi:weather-windy",
|
||||||
unit_imperial=UnitOfSpeed.MILES_PER_HOUR,
|
unit_imperial=UnitOfSpeed.MILES_PER_HOUR,
|
||||||
unit_metric=UnitOfSpeed.METERS_PER_SECOND,
|
unit_metric=UnitOfSpeed.METERS_PER_SECOND,
|
||||||
imperial_conversion=lambda val: SpeedConverter.convert(
|
imperial_conversion=lambda val: SpeedConverter.convert(
|
||||||
@ -270,9 +275,9 @@ SENSOR_TYPES = (
|
|||||||
TomorrowioSensorEntityDescription(
|
TomorrowioSensorEntityDescription(
|
||||||
key=TMRW_ATTR_POLLEN_TREE,
|
key=TMRW_ATTR_POLLEN_TREE,
|
||||||
name="Tree Pollen Index",
|
name="Tree Pollen Index",
|
||||||
|
icon="mdi:tree",
|
||||||
value_map=PollenIndex,
|
value_map=PollenIndex,
|
||||||
translation_key="pollen_index",
|
translation_key="pollen_index",
|
||||||
icon="mdi:flower-pollen",
|
|
||||||
),
|
),
|
||||||
TomorrowioSensorEntityDescription(
|
TomorrowioSensorEntityDescription(
|
||||||
key=TMRW_ATTR_POLLEN_WEED,
|
key=TMRW_ATTR_POLLEN_WEED,
|
||||||
@ -284,9 +289,9 @@ SENSOR_TYPES = (
|
|||||||
TomorrowioSensorEntityDescription(
|
TomorrowioSensorEntityDescription(
|
||||||
key=TMRW_ATTR_POLLEN_GRASS,
|
key=TMRW_ATTR_POLLEN_GRASS,
|
||||||
name="Grass Pollen Index",
|
name="Grass Pollen Index",
|
||||||
|
icon="mdi:grass",
|
||||||
value_map=PollenIndex,
|
value_map=PollenIndex,
|
||||||
translation_key="pollen_index",
|
translation_key="pollen_index",
|
||||||
icon="mdi:flower-pollen",
|
|
||||||
),
|
),
|
||||||
TomorrowioSensorEntityDescription(
|
TomorrowioSensorEntityDescription(
|
||||||
TMRW_ATTR_FIRE_INDEX,
|
TMRW_ATTR_FIRE_INDEX,
|
||||||
@ -304,7 +309,7 @@ SENSOR_TYPES = (
|
|||||||
name="UV Radiation Health Concern",
|
name="UV Radiation Health Concern",
|
||||||
value_map=UVDescription,
|
value_map=UVDescription,
|
||||||
translation_key="uv_index",
|
translation_key="uv_index",
|
||||||
icon="mdi:sun-wireless",
|
icon="mdi:weather-sunny-alert",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user