mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Add entity translations to filesize (#95299)
This commit is contained in:
parent
7737271a30
commit
ad9bf431a8
@ -34,17 +34,17 @@ ICON = "mdi:file"
|
||||
SENSOR_TYPES = (
|
||||
SensorEntityDescription(
|
||||
key="file",
|
||||
translation_key="size",
|
||||
icon=ICON,
|
||||
name="Size",
|
||||
native_unit_of_measurement=UnitOfInformation.MEGABYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="bytes",
|
||||
translation_key="size_bytes",
|
||||
entity_registry_enabled_default=False,
|
||||
icon=ICON,
|
||||
name="Size bytes",
|
||||
native_unit_of_measurement=UnitOfInformation.BYTES,
|
||||
device_class=SensorDeviceClass.DATA_SIZE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
@ -52,9 +52,9 @@ SENSOR_TYPES = (
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="last_updated",
|
||||
translation_key="last_updated",
|
||||
entity_registry_enabled_default=False,
|
||||
icon=ICON,
|
||||
name="Last Updated",
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
|
@ -15,5 +15,18 @@
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]"
|
||||
}
|
||||
},
|
||||
"title": "Filesize"
|
||||
"title": "Filesize",
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"size": {
|
||||
"name": "Size"
|
||||
},
|
||||
"size_bytes": {
|
||||
"name": "Size in bytes"
|
||||
},
|
||||
"last_updated": {
|
||||
"name": "Last updated"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user