YorkshireIoT/ha-google-fit

Don't include "Awake Time" in overall "Sleep Time" Calculation

Closed this issue · 2 comments

System Health details

System Information

version core-2023.11.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.21-v8
arch aarch64
timezone America/Chicago
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.33.0
Stage running
Available Repositories 1346
Downloaded Repositories 7
HACS Data ok
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 11.1
update_channel stable
supervisor_version supervisor-2023.11.3
agent_version 1.6.0
docker_version 24.0.6
disk_total 219.4 GB
disk_used 9.1 GB
healthy true
supported true
board rpi4-64
supervisor_api ok
version_api ok
installed_addons Duck DNS (1.15.0), Advanced SSH & Web Terminal (16.0.1), Home Assistant Google Drive Backup (0.111.1), Node-RED (16.0.2), Mosquitto broker (6.4.0), ESPHome (2023.11.4), Samba share (12.1.0)
Dashboards
dashboards 3
resources 2
views 5
mode storage
Recorder
oldest_recorder_run September 27, 2023 at 1:14 PM
current_recorder_run November 26, 2023 at 4:32 PM
estimated_db_size 1321.02 MiB
database_engine sqlite
database_version 3.41.2

Checklist

  • I have enabled debug logging for my installation and pasted in the debug logs below.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

In FitBit, my sleep yesterday was recorded as this:
In bed: 10:00 PM
Awake: 5:44 AM
Time in bed: 07:44
Awake Time: 01:02
Sleep Time: 06:42

In the HA Fit integration, it took Sleep Time as 7:44 instead of 6:42 (In the Google Fit app it says Sleep = 06:42 as it should)

Integration Version

V3.0.0

Reproduction steps

  1. Set up integration as specified in the documentation.
  2. Have it sync sleep info from FitBit->Health Connect ->Google Fit
  3. In FitBit: Sleep = Time In Bed - Time Awake. In Google Fit: Sleep = Time in Bed - Time Awake. In HA Fit Sleep = Time In Bed

Debug logs

If you want these, they will need to be sent separately. Github says the comment is too long

Same here with a Galaxy Watch 4 and Samsung Health synced to Google Fit.
I bypassed this problem by creating a template sensor which subtracts the awake time reported in Google Fit from the sleep time.

Did that also, which will work until this is fixed :)