mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Improve the readability of status messages in NUT (#141335)
Improve the readability of status messages
This commit is contained in:
parent
b3564b6cff
commit
ec20e41836
@ -1097,6 +1097,6 @@ class NUTSensor(NUTBaseEntity, SensorEntity):
|
|||||||
def _format_display_state(status: dict[str, str]) -> str:
|
def _format_display_state(status: dict[str, str]) -> str:
|
||||||
"""Return UPS display state."""
|
"""Return UPS display state."""
|
||||||
try:
|
try:
|
||||||
return " ".join(STATE_TYPES[state] for state in status[KEY_STATUS].split())
|
return ", ".join(STATE_TYPES[state] for state in status[KEY_STATUS].split())
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return STATE_UNKNOWN
|
return STATE_UNKNOWN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user