Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add entity translations to Ridwell #98918

Merged
merged 3 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/ridwell/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

SENSOR_DESCRIPTION = SensorEntityDescription(
key=SENSOR_TYPE_NEXT_PICKUP,
name="Next Ridwell pickup",
translation_key="next_pickup",
device_class=SensorDeviceClass.DATE,
)

Expand Down
12 changes: 12 additions & 0 deletions homeassistant/components/ridwell/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,17 @@
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]",
"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"
}
}
}
}
6 changes: 2 additions & 4 deletions homeassistant/components/ridwell/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
from .coordinator import RidwellDataUpdateCoordinator
from .entity import RidwellEntity

SWITCH_TYPE_OPT_IN = "opt_in"

SWITCH_DESCRIPTION = SwitchEntityDescription(
key=SWITCH_TYPE_OPT_IN,
name="Opt-in to next pickup",
key="opt_in",
translation_key="opt_in",
icon="mdi:calendar-check",
)

Expand Down