diff --git a/apps/hassgraph/hass_graph.star b/apps/hassgraph/hass_graph.star index 5b92819f3..675057426 100644 --- a/apps/hassgraph/hass_graph.star +++ b/apps/hassgraph/hass_graph.star @@ -100,7 +100,7 @@ def calculate_hourly_average(data): index = 0 for entry in data: - if entry["state"] == "unavailable": + if entry["state"] == "unavailable" or entry["state"] == "unknown": continue timestamp = entry["last_changed"] @@ -135,7 +135,7 @@ def calc_stats(timezone, data): count = 0 for entry in data: - if entry["state"] == "unavailable": + if entry["state"] == "unavailable" or entry["state"] == "unknown": continue value = float(entry["state"])