Add entity translations to Roku (#96083)

* Add entity translations to Roku

* Add entity translations to Roku
This commit is contained in:
Joost Lekkerkerker 2023-08-22 16:59:56 +02:00 committed by GitHub
parent 406f06f0fc
commit 890efd58e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 12 deletions

View file

@ -34,14 +34,14 @@ class RokuSensorEntityDescription(
SENSORS: tuple[RokuSensorEntityDescription, ...] = (
RokuSensorEntityDescription(
key="active_app",
name="Active App",
translation_key="active_app",
entity_category=EntityCategory.DIAGNOSTIC,
icon="mdi:application",
value_fn=lambda device: device.app.name if device.app else None,
),
RokuSensorEntityDescription(
key="active_app_id",
name="Active App ID",
translation_key="active_app_id",
entity_category=EntityCategory.DIAGNOSTIC,
icon="mdi:application-cog",
value_fn=lambda device: device.app.app_id if device.app else None,