diff --git a/main.py b/main.py index 8af0944..55c23af 100644 --- a/main.py +++ b/main.py @@ -53,7 +53,7 @@ def main(): def format_temp(data: dict) -> str: name = data["attributes"]["friendly_name"].lower().replace("temperature", "").strip() - diff = pendulum.parse(data["last_updated"]).diff_for_humans(locale="fr") + diff = pendulum.parse(data["attributes"]["last_successful_update"]).diff_for_humans(locale="fr") return f"{name} : {data['state']}{data['attributes']['unit_of_measurement']} ({diff})"