mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Fix shelly RSSI sensor unit (#49265)
This commit is contained in:
parent
80f66f301b
commit
31c519b26d
@ -9,7 +9,7 @@ from homeassistant.const import (
|
|||||||
LIGHT_LUX,
|
LIGHT_LUX,
|
||||||
PERCENTAGE,
|
PERCENTAGE,
|
||||||
POWER_WATT,
|
POWER_WATT,
|
||||||
SIGNAL_STRENGTH_DECIBELS,
|
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||||
VOLT,
|
VOLT,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ SENSORS = {
|
|||||||
REST_SENSORS = {
|
REST_SENSORS = {
|
||||||
"rssi": RestAttributeDescription(
|
"rssi": RestAttributeDescription(
|
||||||
name="RSSI",
|
name="RSSI",
|
||||||
unit=SIGNAL_STRENGTH_DECIBELS,
|
unit=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||||
value=lambda status, _: status["wifi_sta"]["rssi"],
|
value=lambda status, _: status["wifi_sta"]["rssi"],
|
||||||
device_class=sensor.DEVICE_CLASS_SIGNAL_STRENGTH,
|
device_class=sensor.DEVICE_CLASS_SIGNAL_STRENGTH,
|
||||||
default_enabled=False,
|
default_enabled=False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user