mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add entity translations for Open UV (#95810)
This commit is contained in:
parent
4581c36648
commit
04be7677a9
@ -19,7 +19,7 @@ ATTR_PROTECTION_WINDOW_STARTING_UV = "start_uv"
|
||||
|
||||
BINARY_SENSOR_DESCRIPTION_PROTECTION_WINDOW = BinarySensorEntityDescription(
|
||||
key=TYPE_PROTECTION_WINDOW,
|
||||
name="Protection window",
|
||||
translation_key="protection_window",
|
||||
icon="mdi:sunglasses",
|
||||
)
|
||||
|
||||
|
@ -49,67 +49,67 @@ UV_LEVEL_LOW = "Low"
|
||||
SENSOR_DESCRIPTIONS = (
|
||||
SensorEntityDescription(
|
||||
key=TYPE_CURRENT_OZONE_LEVEL,
|
||||
name="Current ozone level",
|
||||
translation_key="current_ozone_level",
|
||||
native_unit_of_measurement="du",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=TYPE_CURRENT_UV_INDEX,
|
||||
name="Current UV index",
|
||||
translation_key="current_uv_index",
|
||||
icon="mdi:weather-sunny",
|
||||
native_unit_of_measurement=UV_INDEX,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=TYPE_CURRENT_UV_LEVEL,
|
||||
name="Current UV level",
|
||||
translation_key="current_uv_level",
|
||||
icon="mdi:weather-sunny",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=TYPE_MAX_UV_INDEX,
|
||||
name="Max UV index",
|
||||
translation_key="max_uv_index",
|
||||
icon="mdi:weather-sunny",
|
||||
native_unit_of_measurement=UV_INDEX,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=TYPE_SAFE_EXPOSURE_TIME_1,
|
||||
name="Skin type 1 safe exposure time",
|
||||
translation_key="skin_type_1_safe_exposure_time",
|
||||
icon="mdi:timer-outline",
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=TYPE_SAFE_EXPOSURE_TIME_2,
|
||||
name="Skin type 2 safe exposure time",
|
||||
translation_key="skin_type_2_safe_exposure_time",
|
||||
icon="mdi:timer-outline",
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=TYPE_SAFE_EXPOSURE_TIME_3,
|
||||
name="Skin type 3 safe exposure time",
|
||||
translation_key="skin_type_3_safe_exposure_time",
|
||||
icon="mdi:timer-outline",
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=TYPE_SAFE_EXPOSURE_TIME_4,
|
||||
name="Skin type 4 safe exposure time",
|
||||
translation_key="skin_type_4_safe_exposure_time",
|
||||
icon="mdi:timer-outline",
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=TYPE_SAFE_EXPOSURE_TIME_5,
|
||||
name="Skin type 5 safe exposure time",
|
||||
translation_key="skin_type_5_safe_exposure_time",
|
||||
icon="mdi:timer-outline",
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=TYPE_SAFE_EXPOSURE_TIME_6,
|
||||
name="Skin type 6 safe exposure time",
|
||||
translation_key="skin_type_6_safe_exposure_time",
|
||||
icon="mdi:timer-outline",
|
||||
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
|
@ -46,5 +46,44 @@
|
||||
"title": "The {deprecated_service} service is being removed",
|
||||
"description": "Update any automations or scripts that use this service to instead use the `{alternate_service}` service with `{alternate_targets}` as the target."
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"protection_window": {
|
||||
"name": "Protection window"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"current_ozone_level": {
|
||||
"name": "Current ozone level"
|
||||
},
|
||||
"current_uv_index": {
|
||||
"name": "Current UV index"
|
||||
},
|
||||
"current_uv_level": {
|
||||
"name": "Current UV level"
|
||||
},
|
||||
"max_uv_index": {
|
||||
"name": "Max UV index"
|
||||
},
|
||||
"skin_type_1_safe_exposure_time": {
|
||||
"name": "Skin type 1 safe exposure time"
|
||||
},
|
||||
"skin_type_2_safe_exposure_time": {
|
||||
"name": "Skin type 2 safe exposure time"
|
||||
},
|
||||
"skin_type_3_safe_exposure_time": {
|
||||
"name": "Skin type 3 safe exposure time"
|
||||
},
|
||||
"skin_type_4_safe_exposure_time": {
|
||||
"name": "Skin type 4 safe exposure time"
|
||||
},
|
||||
"skin_type_5_safe_exposure_time": {
|
||||
"name": "Skin type 5 safe exposure time"
|
||||
},
|
||||
"skin_type_6_safe_exposure_time": {
|
||||
"name": "Skin type 6 safe exposure time"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user