mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 10:47:10 +00:00
Add entity translations to Lidarr (#95313)
This commit is contained in:
parent
4ab8411145
commit
16bcbe3d22
@ -70,7 +70,7 @@ class LidarrSensorEntityDescription(
|
|||||||
SENSOR_TYPES: dict[str, LidarrSensorEntityDescription[Any]] = {
|
SENSOR_TYPES: dict[str, LidarrSensorEntityDescription[Any]] = {
|
||||||
"disk_space": LidarrSensorEntityDescription(
|
"disk_space": LidarrSensorEntityDescription(
|
||||||
key="disk_space",
|
key="disk_space",
|
||||||
name="Disk space",
|
translation_key="disk_space",
|
||||||
native_unit_of_measurement=UnitOfInformation.GIGABYTES,
|
native_unit_of_measurement=UnitOfInformation.GIGABYTES,
|
||||||
device_class=SensorDeviceClass.DATA_SIZE,
|
device_class=SensorDeviceClass.DATA_SIZE,
|
||||||
icon="mdi:harddisk",
|
icon="mdi:harddisk",
|
||||||
@ -80,7 +80,7 @@ SENSOR_TYPES: dict[str, LidarrSensorEntityDescription[Any]] = {
|
|||||||
),
|
),
|
||||||
"queue": LidarrSensorEntityDescription[LidarrQueue](
|
"queue": LidarrSensorEntityDescription[LidarrQueue](
|
||||||
key="queue",
|
key="queue",
|
||||||
name="Queue",
|
translation_key="queue",
|
||||||
native_unit_of_measurement="Albums",
|
native_unit_of_measurement="Albums",
|
||||||
icon="mdi:download",
|
icon="mdi:download",
|
||||||
value_fn=lambda data, _: data.totalRecords,
|
value_fn=lambda data, _: data.totalRecords,
|
||||||
@ -89,7 +89,7 @@ SENSOR_TYPES: dict[str, LidarrSensorEntityDescription[Any]] = {
|
|||||||
),
|
),
|
||||||
"wanted": LidarrSensorEntityDescription[LidarrQueue](
|
"wanted": LidarrSensorEntityDescription[LidarrQueue](
|
||||||
key="wanted",
|
key="wanted",
|
||||||
name="Wanted",
|
translation_key="wanted",
|
||||||
native_unit_of_measurement="Albums",
|
native_unit_of_measurement="Albums",
|
||||||
icon="mdi:music",
|
icon="mdi:music",
|
||||||
value_fn=lambda data, _: data.totalRecords,
|
value_fn=lambda data, _: data.totalRecords,
|
||||||
|
@ -28,5 +28,18 @@
|
|||||||
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]",
|
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]",
|
||||||
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
|
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"disk_space": {
|
||||||
|
"name": "Disk space"
|
||||||
|
},
|
||||||
|
"queue": {
|
||||||
|
"name": "Queue"
|
||||||
|
},
|
||||||
|
"wanted": {
|
||||||
|
"name": "Wanted"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user