From 69316b433758d9b49fba12f2ea76ed077e26ac86 Mon Sep 17 00:00:00 2001 From: Jonas Date: Mon, 21 Oct 2024 10:37:11 +0200 Subject: [PATCH] add json to today start --- custom_components/webuntis/sensor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/webuntis/sensor.py b/custom_components/webuntis/sensor.py index 0a6bfd5..e0c18b6 100644 --- a/custom_components/webuntis/sensor.py +++ b/custom_components/webuntis/sensor.py @@ -1,4 +1,5 @@ """The Web Untis sensor platform.""" + from __future__ import annotations from typing import Optional @@ -132,6 +133,7 @@ def __init__(self, server: WebUntis) -> None: async def async_update(self) -> None: """Update sensor data.""" self._attr_native_value = self._server.today[0] + self._attr_extra_state_attributes = {"day": self._server.day_json} class WebUntisToayEnd(WebUntisSensorEntity):