mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add icon translations to Filesize (#111536)
This commit is contained in:
parent
01a6b85a35
commit
dbeb93b260
15
homeassistant/components/filesize/icons.json
Normal file
15
homeassistant/components/filesize/icons.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"size": {
|
||||||
|
"default": "mdi:file"
|
||||||
|
},
|
||||||
|
"size_bytes": {
|
||||||
|
"default": "mdi:file"
|
||||||
|
},
|
||||||
|
"last_updated": {
|
||||||
|
"default": "mdi:file"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -23,13 +23,10 @@ from .coordinator import FileSizeCoordinator
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
ICON = "mdi:file"
|
|
||||||
|
|
||||||
SENSOR_TYPES = (
|
SENSOR_TYPES = (
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="file",
|
key="file",
|
||||||
translation_key="size",
|
translation_key="size",
|
||||||
icon=ICON,
|
|
||||||
native_unit_of_measurement=UnitOfInformation.MEGABYTES,
|
native_unit_of_measurement=UnitOfInformation.MEGABYTES,
|
||||||
device_class=SensorDeviceClass.DATA_SIZE,
|
device_class=SensorDeviceClass.DATA_SIZE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
@ -38,7 +35,6 @@ SENSOR_TYPES = (
|
|||||||
key="bytes",
|
key="bytes",
|
||||||
translation_key="size_bytes",
|
translation_key="size_bytes",
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
icon=ICON,
|
|
||||||
native_unit_of_measurement=UnitOfInformation.BYTES,
|
native_unit_of_measurement=UnitOfInformation.BYTES,
|
||||||
device_class=SensorDeviceClass.DATA_SIZE,
|
device_class=SensorDeviceClass.DATA_SIZE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
@ -48,7 +44,6 @@ SENSOR_TYPES = (
|
|||||||
key="last_updated",
|
key="last_updated",
|
||||||
translation_key="last_updated",
|
translation_key="last_updated",
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
icon=ICON,
|
|
||||||
device_class=SensorDeviceClass.TIMESTAMP,
|
device_class=SensorDeviceClass.TIMESTAMP,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user