From 193d450e434b0c10d1383d3760795a471205bc6c Mon Sep 17 00:00:00 2001 From: Jens Andersen Date: Mon, 4 May 2026 13:49:58 +0200 Subject: [PATCH] Support the location name when daily info status is 7 The 7 status indicates a physical placement is set. This appears to be potentially unique per school/institution, but the id and name is included in the getDailyOverview response. I've captured two responses from my kids school with the relevant snippets below: status: 7 location: id: XXXX name: Ude description: "" symbol: icon-Aula_sfo_slide startTime: null endTime: null startDate: null endDate: null isDeactivated: false weekDayMask: null isDateIntervalsEnabled: false isTimeIntervalsEnabled: false isWeekdaysEnabled: false status: 7 location: id: XXXX name: Hal description: "" symbol: icon-Aula_sfo_gymnastic_hall startTime: null endTime: null startDate: null endDate: null isDeactivated: false weekDayMask: null isDateIntervalsEnabled: false isTimeIntervalsEnabled: false isWeekdaysEnabled: false --- custom_components/aula/sensor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_components/aula/sensor.py b/custom_components/aula/sensor.py index 4f1f147..7078ad9 100644 --- a/custom_components/aula/sensor.py +++ b/custom_components/aula/sensor.py @@ -148,6 +148,7 @@ def state(self): 3 = KOMMET/TIL STEDE 4 = PÅ TUR 5 = SOVER + 7 = PHYSICAL PLACEMENT (Mere info in "location") 8 = HENTET/GÅET """ if self._client.presence[str(self._child["id"])] == 1: @@ -170,6 +171,8 @@ def state(self): "15", ] daily_info = self._client._daily_overview[str(self._child["id"])] + if daily_info["status"] == 7 and daily_info.get('location') is not None: + return daily_info['location'].get('name', states[daily_info["status"]]) return states[daily_info["status"]] else: _LOGGER.debug("Setting state to n/a for child " + str(self._child["id"]))