mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Actually use translated entity names in Lametric (#135381)
This commit is contained in:
parent
0d85f54e76
commit
52c57eb2e5
@ -33,7 +33,6 @@ NUMBERS = [
|
|||||||
LaMetricNumberEntityDescription(
|
LaMetricNumberEntityDescription(
|
||||||
key="brightness",
|
key="brightness",
|
||||||
translation_key="brightness",
|
translation_key="brightness",
|
||||||
name="Brightness",
|
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
native_step=1,
|
native_step=1,
|
||||||
native_min_value=0,
|
native_min_value=0,
|
||||||
@ -45,11 +44,11 @@ NUMBERS = [
|
|||||||
LaMetricNumberEntityDescription(
|
LaMetricNumberEntityDescription(
|
||||||
key="volume",
|
key="volume",
|
||||||
translation_key="volume",
|
translation_key="volume",
|
||||||
name="Volume",
|
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
native_step=1,
|
native_step=1,
|
||||||
native_min_value=0,
|
native_min_value=0,
|
||||||
native_max_value=100,
|
native_max_value=100,
|
||||||
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
has_fn=lambda device: bool(device.audio and device.audio.available),
|
has_fn=lambda device: bool(device.audio and device.audio.available),
|
||||||
value_fn=lambda device: device.audio.volume if device.audio else 0,
|
value_fn=lambda device: device.audio.volume if device.audio else 0,
|
||||||
set_value_fn=lambda api, volume: api.audio(volume=int(volume)),
|
set_value_fn=lambda api, volume: api.audio(volume=int(volume)),
|
||||||
|
@ -66,6 +66,14 @@
|
|||||||
"name": "Dismiss all notifications"
|
"name": "Dismiss all notifications"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"number": {
|
||||||
|
"brightness": {
|
||||||
|
"name": "Brightness"
|
||||||
|
},
|
||||||
|
"volume": {
|
||||||
|
"name": "Volume"
|
||||||
|
}
|
||||||
|
},
|
||||||
"sensor": {
|
"sensor": {
|
||||||
"rssi": {
|
"rssi": {
|
||||||
"name": "Wi-Fi signal"
|
"name": "Wi-Fi signal"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user