Add entity translations to Fully Kiosk (#95368)

This commit is contained in:
Joost Lekkerkerker 2023-06-27 17:41:41 +02:00 committed by GitHub
parent df65fa3899
commit e7cc839a96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 111 additions and 27 deletions

View file

@ -39,31 +39,31 @@ class FullyButtonEntityDescription(
BUTTONS: tuple[FullyButtonEntityDescription, ...] = (
FullyButtonEntityDescription(
key="restartApp",
name="Restart browser",
translation_key="restart_browser",
device_class=ButtonDeviceClass.RESTART,
entity_category=EntityCategory.CONFIG,
press_action=lambda fully: fully.restartApp(),
),
FullyButtonEntityDescription(
key="rebootDevice",
name="Reboot device",
translation_key="restart_device",
device_class=ButtonDeviceClass.RESTART,
entity_category=EntityCategory.CONFIG,
press_action=lambda fully: fully.rebootDevice(),
),
FullyButtonEntityDescription(
key="toForeground",
name="Bring to foreground",
translation_key="to_foreground",
press_action=lambda fully: fully.toForeground(),
),
FullyButtonEntityDescription(
key="toBackground",
name="Send to background",
translation_key="to_background",
press_action=lambda fully: fully.toBackground(),
),
FullyButtonEntityDescription(
key="loadStartUrl",
name="Load start URL",
translation_key="load_start_url",
press_action=lambda fully: fully.loadStartUrl(),
),
)