Expose the location name as state when daily info status is 7#353
Open
EnJens wants to merge 1 commit into
Open
Expose the location name as state when daily info status is 7#353EnJens wants to merge 1 commit into
EnJens wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
It's not entirely clear if this is available in other statuses, so I've kept it to safe for now. It could probably be simplified to just checking if location is not None.
I realize these are available as attributes on the sensor, but getting it as the state makes it easier to display and you get a better history.
I've captured two responses from my kids school with the relevant snippets below: