1
mirror of https://github.com/home-assistant/core synced 2024-09-06 10:29:55 +02:00

Add state translations and icons to ClimaCell sensors (#63526)

This commit is contained in:
Raman Gupta 2022-01-07 08:08:49 -05:00 committed by GitHub
parent 9236c08e6c
commit 6d42af1b12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 3 deletions

View File

@ -246,6 +246,8 @@ CC_SENSOR_TYPES = (
key=CC_ATTR_PRECIPITATION_TYPE,
name="Precipitation Type",
value_map=PrecipitationType,
device_class="climacell__precipitation_type",
icon="mdi:weather-snowy-rainy",
),
ClimaCellSensorEntityDescription(
key=CC_ATTR_OZONE,
@ -301,6 +303,8 @@ CC_SENSOR_TYPES = (
key=CC_ATTR_EPA_HEALTH_CONCERN,
name="US EPA Health Concern",
value_map=HealthConcernType,
device_class="climacell__health_concern",
icon="mdi:hospital",
),
ClimaCellSensorEntityDescription(
key=CC_ATTR_CHINA_AQI,
@ -315,25 +319,34 @@ CC_SENSOR_TYPES = (
key=CC_ATTR_CHINA_HEALTH_CONCERN,
name="China MEP Health Concern",
value_map=HealthConcernType,
device_class="climacell__health_concern",
icon="mdi:hospital",
),
ClimaCellSensorEntityDescription(
key=CC_ATTR_POLLEN_TREE,
name="Tree Pollen Index",
value_map=PollenIndex,
device_class="climacell__pollen_index",
icon="mdi:flower-pollen",
),
ClimaCellSensorEntityDescription(
key=CC_ATTR_POLLEN_WEED,
name="Weed Pollen Index",
value_map=PollenIndex,
device_class="climacell__pollen_index",
icon="mdi:flower-pollen",
),
ClimaCellSensorEntityDescription(
key=CC_ATTR_POLLEN_GRASS,
name="Grass Pollen Index",
value_map=PollenIndex,
device_class="climacell__pollen_index",
icon="mdi:flower-pollen",
),
ClimaCellSensorEntityDescription(
CC_ATTR_FIRE_INDEX,
name="Fire Index",
icon="mdi:fire",
),
)

View File

@ -22,7 +22,7 @@
"options": {
"step": {
"init": {
"title": "Update [%key:component::climacell::title%] Options",
"title": "Update ClimaCell Options",
"description": "If you choose to enable the `nowcast` forecast entity, you can configure the number of minutes between each forecast. The number of forecasts provided depends on the number of minutes chosen between forecasts.",
"data": {
"timestep": "Min. Between NowCast Forecasts"

View File

@ -0,0 +1,27 @@
{
"state": {
"climacell__pollen_index": {
"none": "None",
"very_low": "Very Low",
"low": "Low",
"medium": "Medium",
"high": "High",
"very_high": "Very High"
},
"climacell__health_concern": {
"good": "Good",
"moderate": "Moderate",
"unhealthy_for_sensitive_groups": "Unhealthy for Sensitive Groups",
"unhealthy": "Unhealthy",
"very_unhealthy": "Very Unhealthy",
"hazardous": "Hazardous"
},
"climacell__precipitation_type": {
"none": "None",
"rain": "Rain",
"snow": "Snow",
"freezing_rain": "Freezing Rain",
"ice_pellets": "Ice Pellets"
}
}
}

View File

@ -29,6 +29,5 @@
"title": "Update ClimaCell Options"
}
}
},
"title": "ClimaCell"
}
}

View File

@ -0,0 +1,27 @@
{
"state": {
"climacell__health_concern": {
"good": "Good",
"hazardous": "Hazardous",
"moderate": "Moderate",
"unhealthy": "Unhealthy",
"unhealthy_for_sensitive_groups": "Unhealthy for Sensitive Groups",
"very_unhealthy": "Very Unhealthy"
},
"climacell__pollen_index": {
"high": "High",
"low": "Low",
"medium": "Medium",
"none": "None",
"very_high": "Very High",
"very_low": "Very Low"
},
"climacell__precipitation_type": {
"freezing_rain": "Freezing Rain",
"ice_pellets": "Ice Pellets",
"none": "None",
"rain": "Rain",
"snow": "Snow"
}
}
}