mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +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(
|
||||
key="brightness",
|
||||
translation_key="brightness",
|
||||
name="Brightness",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
native_step=1,
|
||||
native_min_value=0,
|
||||
@ -45,11 +44,11 @@ NUMBERS = [
|
||||
LaMetricNumberEntityDescription(
|
||||
key="volume",
|
||||
translation_key="volume",
|
||||
name="Volume",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
native_step=1,
|
||||
native_min_value=0,
|
||||
native_max_value=100,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
has_fn=lambda device: bool(device.audio and device.audio.available),
|
||||
value_fn=lambda device: device.audio.volume if device.audio else 0,
|
||||
set_value_fn=lambda api, volume: api.audio(volume=int(volume)),
|
||||
|
@ -66,6 +66,14 @@
|
||||
"name": "Dismiss all notifications"
|
||||
}
|
||||
},
|
||||
"number": {
|
||||
"brightness": {
|
||||
"name": "Brightness"
|
||||
},
|
||||
"volume": {
|
||||
"name": "Volume"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"rssi": {
|
||||
"name": "Wi-Fi signal"
|
||||
|
Loading…
x
Reference in New Issue
Block a user