Add entity translations to Guardian (#95411)

This commit is contained in:
Joost Lekkerkerker 2023-06-27 22:24:41 +02:00 committed by GitHub
parent bafb81337b
commit 21c619e702
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 11 deletions

View file

@ -56,15 +56,15 @@ async def _async_valve_reset(client: Client) -> None:
BUTTON_DESCRIPTIONS = (
ValveControllerButtonDescription(
key=BUTTON_KIND_REBOOT,
name="Reboot",
push_action=_async_reboot,
device_class=ButtonDeviceClass.RESTART,
# Buttons don't actually need a coordinator; we give them one so they can
# properly inherit from GuardianEntity:
api_category=API_SYSTEM_DIAGNOSTICS,
),
ValveControllerButtonDescription(
key=BUTTON_KIND_RESET_VALVE_DIAGNOSTICS,
name="Reset valve diagnostics",
translation_key="reset_diagnostics",
push_action=_async_valve_reset,
# Buttons don't actually need a coordinator; we give them one so they can
# properly inherit from GuardianEntity: