Improve the readability of status messages in NUT (#141335)

Improve the readability of status messages
This commit is contained in:
Mauricio Bonani 2025-03-30 10:26:44 -04:00 committed by GitHub
parent b3564b6cff
commit ec20e41836
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1097,6 +1097,6 @@ class NUTSensor(NUTBaseEntity, SensorEntity):
def _format_display_state(status: dict[str, str]) -> str:
"""Return UPS display state."""
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:
return STATE_UNKNOWN