mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Add entity name translations to LaMetric (#90538)
* Add entity name translations to LaMetric * Consistency
This commit is contained in:
parent
8a99d2a566
commit
9478518937
@ -36,28 +36,28 @@ class LaMetricButtonEntityDescription(
|
||||
BUTTONS = [
|
||||
LaMetricButtonEntityDescription(
|
||||
key="app_next",
|
||||
name="Next app",
|
||||
translation_key="app_next",
|
||||
icon="mdi:arrow-right-bold",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
press_fn=lambda api: api.app_next(),
|
||||
),
|
||||
LaMetricButtonEntityDescription(
|
||||
key="app_previous",
|
||||
name="Previous app",
|
||||
translation_key="app_previous",
|
||||
icon="mdi:arrow-left-bold",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
press_fn=lambda api: api.app_previous(),
|
||||
),
|
||||
LaMetricButtonEntityDescription(
|
||||
key="dismiss_current",
|
||||
name="Dismiss current notification",
|
||||
translation_key="dismiss_current",
|
||||
icon="mdi:bell-cancel",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
press_fn=lambda api: api.dismiss_current_notification(),
|
||||
),
|
||||
LaMetricButtonEntityDescription(
|
||||
key="dismiss_all",
|
||||
name="Dismiss all notifications",
|
||||
translation_key="dismiss_all",
|
||||
icon="mdi:bell-cancel",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
press_fn=lambda api: api.dismiss_all_notifications(),
|
||||
|
@ -37,11 +37,10 @@ class LaMetricSelectEntityDescription(
|
||||
SELECTS = [
|
||||
LaMetricSelectEntityDescription(
|
||||
key="brightness_mode",
|
||||
name="Brightness mode",
|
||||
translation_key="brightness_mode",
|
||||
icon="mdi:brightness-auto",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
options=["auto", "manual"],
|
||||
translation_key="brightness_mode",
|
||||
current_fn=lambda device: device.display.brightness_mode.value,
|
||||
select_fn=lambda api, opt: api.display(brightness_mode=BrightnessMode(opt)),
|
||||
),
|
||||
|
@ -38,6 +38,7 @@ class LaMetricSensorEntityDescription(
|
||||
SENSORS = [
|
||||
LaMetricSensorEntityDescription(
|
||||
key="rssi",
|
||||
translation_key="rssi",
|
||||
name="Wi-Fi signal",
|
||||
icon="mdi:wifi",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
|
@ -45,13 +45,38 @@
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"button": {
|
||||
"app_next": {
|
||||
"name": "Next app"
|
||||
},
|
||||
"app_previous": {
|
||||
"name": "Previous app"
|
||||
},
|
||||
"dismiss_current": {
|
||||
"name": "Dismiss current notification"
|
||||
},
|
||||
"dismiss_all": {
|
||||
"name": "Dismiss all notifications"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"rssi": {
|
||||
"name": "Wi-Fi signal"
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
"brightness_mode": {
|
||||
"name": "Brightness mode",
|
||||
"state": {
|
||||
"auto": "Automatic",
|
||||
"manual": "Manual"
|
||||
}
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"bluetooth": {
|
||||
"name": "Bluetooth"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class LaMetricSwitchEntityDescription(
|
||||
SWITCHES = [
|
||||
LaMetricSwitchEntityDescription(
|
||||
key="bluetooth",
|
||||
name="Bluetooth",
|
||||
translation_key="bluetooth",
|
||||
icon="mdi:bluetooth",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
available_fn=lambda device: device.bluetooth.available,
|
||||
|
Loading…
x
Reference in New Issue
Block a user