mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Add entity translations to Ridwell (#98918)
This commit is contained in:
parent
147351be6e
commit
0a1ad8a119
@ -27,7 +27,7 @@ ATTR_QUANTITY = "quantity"
|
|||||||
|
|
||||||
SENSOR_DESCRIPTION = SensorEntityDescription(
|
SENSOR_DESCRIPTION = SensorEntityDescription(
|
||||||
key=SENSOR_TYPE_NEXT_PICKUP,
|
key=SENSOR_TYPE_NEXT_PICKUP,
|
||||||
name="Next Ridwell pickup",
|
translation_key="next_pickup",
|
||||||
device_class=SensorDeviceClass.DATE,
|
device_class=SensorDeviceClass.DATE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -24,5 +24,17 @@
|
|||||||
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]",
|
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]",
|
||||||
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
|
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"next_pickup": {
|
||||||
|
"name": "Next pickup"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"switch": {
|
||||||
|
"opt_in": {
|
||||||
|
"name": "Opt-in to next pickup"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,9 @@ from .const import DOMAIN
|
|||||||
from .coordinator import RidwellDataUpdateCoordinator
|
from .coordinator import RidwellDataUpdateCoordinator
|
||||||
from .entity import RidwellEntity
|
from .entity import RidwellEntity
|
||||||
|
|
||||||
SWITCH_TYPE_OPT_IN = "opt_in"
|
|
||||||
|
|
||||||
SWITCH_DESCRIPTION = SwitchEntityDescription(
|
SWITCH_DESCRIPTION = SwitchEntityDescription(
|
||||||
key=SWITCH_TYPE_OPT_IN,
|
key="opt_in",
|
||||||
name="Opt-in to next pickup",
|
translation_key="opt_in",
|
||||||
icon="mdi:calendar-check",
|
icon="mdi:calendar-check",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user