mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 11:29:46 +00:00
Add missing unit for signal strength (#40436)
* Added missing unit for signal strength * Added one more unit * Replaced string with variable * Fixed wrong import * Fix import * Replaced string with variable * Fixed wrong import * Apply suggestions from code review * Black * Again a fix :-( * iSort * iSort after merge Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import logging
|
||||
from homeassistant.const import (
|
||||
DEVICE_CLASS_SIGNAL_STRENGTH,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
TEMP_FAHRENHEIT,
|
||||
)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
@@ -14,7 +15,11 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SENSORS = {
|
||||
TYPE_TEMPERATURE: ["Temperature", TEMP_FAHRENHEIT, DEVICE_CLASS_TEMPERATURE],
|
||||
TYPE_WIFI_STRENGTH: ["Wifi Signal", "dBm", DEVICE_CLASS_SIGNAL_STRENGTH],
|
||||
TYPE_WIFI_STRENGTH: [
|
||||
"Wifi Signal",
|
||||
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
DEVICE_CLASS_SIGNAL_STRENGTH,
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user