mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Add entity translations to Twentemilieu (#96762)
This commit is contained in:
parent
005e45edcc
commit
7ccb06ed22
@ -17,7 +17,7 @@ from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||
|
||||
from .const import DOMAIN, WASTE_TYPE_TO_DESCRIPTION
|
||||
from .const import DOMAIN
|
||||
from .entity import TwenteMilieuEntity
|
||||
|
||||
|
||||
@ -38,36 +38,36 @@ class TwenteMilieuSensorDescription(
|
||||
SENSORS: tuple[TwenteMilieuSensorDescription, ...] = (
|
||||
TwenteMilieuSensorDescription(
|
||||
key="tree",
|
||||
translation_key="christmas_tree_pickup",
|
||||
waste_type=WasteType.TREE,
|
||||
name=WASTE_TYPE_TO_DESCRIPTION[WasteType.TREE],
|
||||
icon="mdi:pine-tree",
|
||||
device_class=SensorDeviceClass.DATE,
|
||||
),
|
||||
TwenteMilieuSensorDescription(
|
||||
key="Non-recyclable",
|
||||
translation_key="non_recyclable_waste_pickup",
|
||||
waste_type=WasteType.NON_RECYCLABLE,
|
||||
name=WASTE_TYPE_TO_DESCRIPTION[WasteType.NON_RECYCLABLE],
|
||||
icon="mdi:delete-empty",
|
||||
device_class=SensorDeviceClass.DATE,
|
||||
),
|
||||
TwenteMilieuSensorDescription(
|
||||
key="Organic",
|
||||
translation_key="organic_waste_pickup",
|
||||
waste_type=WasteType.ORGANIC,
|
||||
name=WASTE_TYPE_TO_DESCRIPTION[WasteType.ORGANIC],
|
||||
icon="mdi:delete-empty",
|
||||
device_class=SensorDeviceClass.DATE,
|
||||
),
|
||||
TwenteMilieuSensorDescription(
|
||||
key="Paper",
|
||||
translation_key="paper_waste_pickup",
|
||||
waste_type=WasteType.PAPER,
|
||||
name=WASTE_TYPE_TO_DESCRIPTION[WasteType.PAPER],
|
||||
icon="mdi:delete-empty",
|
||||
device_class=SensorDeviceClass.DATE,
|
||||
),
|
||||
TwenteMilieuSensorDescription(
|
||||
key="Plastic",
|
||||
translation_key="packages_waste_pickup",
|
||||
waste_type=WasteType.PACKAGES,
|
||||
name=WASTE_TYPE_TO_DESCRIPTION[WasteType.PACKAGES],
|
||||
icon="mdi:delete-empty",
|
||||
device_class=SensorDeviceClass.DATE,
|
||||
),
|
||||
|
@ -17,5 +17,24 @@
|
||||
"abort": {
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_location%]"
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"non_recyclable_waste_pickup": {
|
||||
"name": "Non-recyclable waste pickup"
|
||||
},
|
||||
"organic_waste_pickup": {
|
||||
"name": "Organic waste pickup"
|
||||
},
|
||||
"packages_waste_pickup": {
|
||||
"name": "Packages waste pickup"
|
||||
},
|
||||
"paper_waste_pickup": {
|
||||
"name": "Paper waste pickup"
|
||||
},
|
||||
"christmas_tree_pickup": {
|
||||
"name": "Christmas tree pickup"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
'original_name': 'Christmas tree pickup',
|
||||
'platform': 'twentemilieu',
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'translation_key': 'christmas_tree_pickup',
|
||||
'unique_id': 'twentemilieu_12345_tree',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
@ -109,7 +109,7 @@
|
||||
'original_name': 'Non-recyclable waste pickup',
|
||||
'platform': 'twentemilieu',
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'translation_key': 'non_recyclable_waste_pickup',
|
||||
'unique_id': 'twentemilieu_12345_Non-recyclable',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
@ -180,7 +180,7 @@
|
||||
'original_name': 'Organic waste pickup',
|
||||
'platform': 'twentemilieu',
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'translation_key': 'organic_waste_pickup',
|
||||
'unique_id': 'twentemilieu_12345_Organic',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
@ -251,7 +251,7 @@
|
||||
'original_name': 'Packages waste pickup',
|
||||
'platform': 'twentemilieu',
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'translation_key': 'packages_waste_pickup',
|
||||
'unique_id': 'twentemilieu_12345_Plastic',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
@ -322,7 +322,7 @@
|
||||
'original_name': 'Paper waste pickup',
|
||||
'platform': 'twentemilieu',
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'translation_key': 'paper_waste_pickup',
|
||||
'unique_id': 'twentemilieu_12345_Paper',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user