Closed nitobuendia closed 1 year ago
I can reproduce this bug. In my case, 0d_ago works but 1d_ago data was missing and this is what I see on my sleep_periods
0d_ago:
- day: '2023-01-15'
total_sleep_duration_in_hours: 6.07
2d_ago:
- day: '2023-01-13'
total_sleep_duration_in_hours: 5.95
1d_ago is missing because there was no data found. This has nothing to do with the 0d
but with the fact that there was no data for that given day and can affect any dates.
I think this should be fixed now @akeslo. You can redownload the latest component code or do the changes manually, it should be only one line of code anyway. Thanks for your help!
@nitobuendia hmm, I am still seeing null here but I do have data for today and even for yesterday in the cloud ui. API is also returning data for today (see json output from #26)
Null is expected is there's no data. What was not expected is not having the day at all. The null appearing is the default sensor when no data is present.
On why you're missing data, this would be what we're looking at on #26
Originally posted by @akeslo in https://github.com/nitobuendia/oura-custom-component/issues/10#issuecomment-1379645988
My Config
sleep_periods (oura_sleep)