Skip to content

Commit

Permalink
Don't log empty value for alarmtxt
Browse files Browse the repository at this point in the history
  • Loading branch information
golles committed Sep 30, 2023
1 parent 65e7818 commit a58c0a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/knmi/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_value(
) -> float | int | str | None:
"""Get a value from the retrieved data and convert to given type"""
if self.data and key in self.data:
if self.data.get(key, None) == "":
if self.data.get(key, None) == "" and key != "alarmtxt":
_LOGGER.warning("Value %s is empty in API response", key)
return "" # Leave empty, eg. warning attribute can be an empty string.

Expand Down

0 comments on commit a58c0a4

Please sign in to comment.