Improve Withings test fixtures (#101931)

This commit is contained in:
Joost Lekkerkerker 2023-10-13 13:35:34 +02:00 committed by GitHub
parent 43753b841f
commit 53e97fee0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 237 additions and 81 deletions

View File

@ -5,12 +5,14 @@
"offset": 0,
"measuregrps": [
{
"attrib": 0,
"category": 1,
"created": 1564660800,
"date": 1564660800,
"deviceid": "DEV_ID",
"grpid": 1,
"attrib": 0,
"date": 1564660800,
"created": 1564660800,
"modified": 1564660800,
"category": 1,
"deviceid": "91a7e556c2022ef54dca6e07a853c3193734d148",
"hash_deviceid": "91a7e556c2022ef54dca6e07a853c3193734d148",
"measures": [
{
"type": 1,
@ -92,15 +94,20 @@
"unit": 0,
"value": 100
}
]
],
"modelid": 45,
"model": "BPM Connect",
"comment": null
},
{
"attrib": 0,
"category": 1,
"created": 1564657200,
"date": 1564657200,
"deviceid": "DEV_ID",
"grpid": 1,
"attrib": 0,
"date": 1564657200,
"created": 1564657200,
"modified": 1564657200,
"category": 1,
"deviceid": "91a7e556c2022ef54dca6e07a853c3193734d148",
"hash_deviceid": "91a7e556c2022ef54dca6e07a853c3193734d148",
"measures": [
{
"type": 1,
@ -182,15 +189,20 @@
"unit": 0,
"value": 101
}
]
],
"modelid": 45,
"model": "BPM Connect",
"comment": null
},
{
"attrib": 1,
"category": 1,
"created": 1564664400,
"date": 1564664400,
"deviceid": "DEV_ID",
"grpid": 1,
"attrib": 1,
"date": 1564664400,
"created": 1564664400,
"modified": 1564664400,
"category": 1,
"deviceid": "91a7e556c2022ef54dca6e07a853c3193734d148",
"hash_deviceid": "91a7e556c2022ef54dca6e07a853c3193734d148",
"measures": [
{
"type": 1,
@ -272,7 +284,10 @@
"unit": 0,
"value": 102
}
]
],
"modelid": 45,
"model": "BPM Connect",
"comment": null
}
]
}

View File

@ -3,58 +3,199 @@
"offset": 0,
"series": [
{
"timezone": "UTC",
"id": 2081804182,
"timezone": "Europe/Paris",
"model": 32,
"startdate": 1548979200,
"enddate": 1548979200,
"date": 1548979200,
"modified": 12345,
"model_id": 63,
"hash_deviceid": "201d0b9a0556d6b755166b2cf8d22d3bdf0487ee",
"startdate": 1618691453,
"enddate": 1618713173,
"date": "2021-04-18",
"data": {
"breathing_disturbances_intensity": 110,
"deepsleepduration": 111,
"durationtosleep": 112,
"durationtowakeup": 113,
"hr_average": 114,
"hr_max": 115,
"hr_min": 116,
"lightsleepduration": 117,
"remsleepduration": 118,
"rr_average": 119,
"rr_max": 120,
"rr_min": 121,
"sleep_score": 122,
"snoring": 123,
"snoringepisodecount": 124,
"wakeupcount": 125,
"wakeupduration": 126
}
"wakeupduration": 3060,
"wakeupcount": 1,
"durationtosleep": 540,
"remsleepduration": 2400,
"durationtowakeup": 1140,
"total_sleep_time": 18660,
"sleep_efficiency": 0.86,
"sleep_latency": 540,
"wakeup_latency": 1140,
"waso": 1380,
"nb_rem_episodes": 1,
"out_of_bed_count": 0,
"lightsleepduration": 10440,
"deepsleepduration": 5820,
"hr_average": 103,
"hr_min": 70,
"hr_max": 120,
"rr_average": 14,
"rr_min": 10,
"rr_max": 20,
"breathing_disturbances_intensity": 9,
"snoring": 1080,
"snoringepisodecount": 18,
"sleep_score": 37,
"apnea_hypopnea_index": 9
},
"created": 1620237476,
"modified": 1620237476
},
{
"timezone": "UTC",
"id": 2081804265,
"timezone": "Europe/Paris",
"model": 32,
"startdate": 1548979200,
"enddate": 1548979200,
"date": 1548979200,
"modified": 12345,
"model_id": 63,
"hash_deviceid": "201d0b9a0556d6b755166b2cf8d22d3bdf0487ee",
"startdate": 1618605055,
"enddate": 1618636975,
"date": "2021-04-17",
"data": {
"breathing_disturbances_intensity": 210,
"deepsleepduration": 211,
"durationtosleep": 212,
"durationtowakeup": 213,
"hr_average": 214,
"hr_max": 215,
"hr_min": 216,
"lightsleepduration": 217,
"remsleepduration": 218,
"rr_average": 219,
"rr_max": 220,
"rr_min": 221,
"sleep_score": 222,
"snoring": 223,
"snoringepisodecount": 224,
"wakeupcount": 225,
"wakeupduration": 226
}
"wakeupduration": 2520,
"wakeupcount": 3,
"durationtosleep": 900,
"remsleepduration": 6840,
"durationtowakeup": 420,
"total_sleep_time": 26880,
"sleep_efficiency": 0.91,
"sleep_latency": 900,
"wakeup_latency": 420,
"waso": 1200,
"nb_rem_episodes": 2,
"out_of_bed_count": 0,
"lightsleepduration": 12840,
"deepsleepduration": 7200,
"hr_average": 85,
"hr_min": 50,
"hr_max": 120,
"rr_average": 16,
"rr_min": 10,
"rr_max": 20,
"breathing_disturbances_intensity": 14,
"snoring": 1140,
"snoringepisodecount": 19,
"sleep_score": 90,
"apnea_hypopnea_index": 14
},
"created": 1620237480,
"modified": 1620237479
},
{
"id": 2081804358,
"timezone": "Europe/Paris",
"model": 32,
"model_id": 63,
"hash_deviceid": "201d0b9a0556d6b755166b2cf8d22d3bdf0487ee",
"startdate": 1618518658,
"enddate": 1618548058,
"date": "2021-04-16",
"data": {
"wakeupduration": 4080,
"wakeupcount": 1,
"durationtosleep": 840,
"remsleepduration": 2040,
"durationtowakeup": 1560,
"total_sleep_time": 16860,
"sleep_efficiency": 0.81,
"sleep_latency": 840,
"wakeup_latency": 1560,
"waso": 1680,
"nb_rem_episodes": 2,
"out_of_bed_count": 0,
"lightsleepduration": 11100,
"deepsleepduration": 3720,
"hr_average": 65,
"hr_min": 50,
"hr_max": 91,
"rr_average": 14,
"rr_min": 10,
"rr_max": 20,
"breathing_disturbances_intensity": -1,
"snoring": 1020,
"snoringepisodecount": 17,
"sleep_score": 20,
"apnea_hypopnea_index": -1
},
"created": 1620237484,
"modified": 1620237484
},
{
"id": 2081804405,
"timezone": "Europe/Paris",
"model": 32,
"model_id": 63,
"hash_deviceid": "201d0b9a0556d6b755166b2cf8d22d3bdf0487ee",
"startdate": 1618432203,
"enddate": 1618453143,
"date": "2021-04-15",
"data": {
"wakeupduration": 4080,
"wakeupcount": 1,
"durationtosleep": 840,
"remsleepduration": 2040,
"durationtowakeup": 1560,
"total_sleep_time": 16860,
"sleep_efficiency": 0.81,
"sleep_latency": 840,
"wakeup_latency": 1560,
"waso": 1680,
"nb_rem_episodes": 2,
"out_of_bed_count": 0,
"lightsleepduration": 11100,
"deepsleepduration": 3720,
"hr_average": 65,
"hr_min": 50,
"hr_max": 91,
"rr_average": 14,
"rr_min": 10,
"rr_max": 20,
"breathing_disturbances_intensity": -1,
"snoring": 1020,
"snoringepisodecount": 17,
"sleep_score": 20,
"apnea_hypopnea_index": -1
},
"created": 1620237486,
"modified": 1620237486
},
{
"id": 2081804490,
"timezone": "Europe/Paris",
"model": 32,
"model_id": 63,
"hash_deviceid": "201d0b9a0556d6b755166b2cf8d22d3bdf0487ee",
"startdate": 1618345805,
"enddate": 1618373504,
"date": "2021-04-14",
"data": {
"wakeupduration": 3600,
"wakeupcount": 2,
"durationtosleep": 780,
"remsleepduration": 3960,
"durationtowakeup": 300,
"total_sleep_time": 22680,
"sleep_efficiency": 0.86,
"sleep_latency": 780,
"wakeup_latency": 300,
"waso": 3939,
"nb_rem_episodes": 4,
"out_of_bed_count": 3,
"lightsleepduration": 12960,
"deepsleepduration": 5760,
"hr_average": 98,
"hr_min": 70,
"hr_max": 120,
"rr_average": 13,
"rr_min": 10,
"rr_max": 20,
"breathing_disturbances_intensity": 29,
"snoring": 960,
"snoringepisodecount": 16,
"sleep_score": 62,
"apnea_hypopnea_index": 29
},
"created": 1620237490,
"modified": 1620237489
}
]
}

View File

@ -127,7 +127,7 @@
'entity_id': 'sensor.henk_breathing_disturbances_intensity',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '160.0',
'state': '10.0',
})
# ---
# name: test_all_entities.17
@ -143,7 +143,7 @@
'entity_id': 'sensor.henk_deep_sleep',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '322',
'state': '26220',
})
# ---
# name: test_all_entities.18
@ -159,7 +159,7 @@
'entity_id': 'sensor.henk_time_to_sleep',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '162.0',
'state': '780.0',
})
# ---
# name: test_all_entities.19
@ -175,7 +175,7 @@
'entity_id': 'sensor.henk_time_to_wakeup',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '163.0',
'state': '996.0',
})
# ---
# name: test_all_entities.2
@ -205,7 +205,7 @@
'entity_id': 'sensor.henk_average_heart_rate',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '164.0',
'state': '83.2',
})
# ---
# name: test_all_entities.21
@ -220,7 +220,7 @@
'entity_id': 'sensor.henk_maximum_heart_rate',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '165.0',
'state': '108.4',
})
# ---
# name: test_all_entities.22
@ -235,7 +235,7 @@
'entity_id': 'sensor.henk_minimum_heart_rate',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '166.0',
'state': '58.0',
})
# ---
# name: test_all_entities.23
@ -251,7 +251,7 @@
'entity_id': 'sensor.henk_light_sleep',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '334',
'state': '58440',
})
# ---
# name: test_all_entities.24
@ -267,7 +267,7 @@
'entity_id': 'sensor.henk_rem_sleep',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '336',
'state': '17280',
})
# ---
# name: test_all_entities.25
@ -281,7 +281,7 @@
'entity_id': 'sensor.henk_average_respiratory_rate',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '169.0',
'state': '14.2',
})
# ---
# name: test_all_entities.26
@ -295,7 +295,7 @@
'entity_id': 'sensor.henk_maximum_respiratory_rate',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '170.0',
'state': '20.0',
})
# ---
# name: test_all_entities.27
@ -309,7 +309,7 @@
'entity_id': 'sensor.henk_minimum_respiratory_rate',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '171.0',
'state': '10.0',
})
# ---
# name: test_all_entities.28
@ -324,7 +324,7 @@
'entity_id': 'sensor.henk_sleep_score',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '222',
'state': '90',
})
# ---
# name: test_all_entities.29
@ -337,7 +337,7 @@
'entity_id': 'sensor.henk_snoring',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '173.0',
'state': '1044.0',
})
# ---
# name: test_all_entities.3
@ -365,7 +365,7 @@
'entity_id': 'sensor.henk_snoring_episode_count',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '348',
'state': '87',
})
# ---
# name: test_all_entities.31
@ -380,7 +380,7 @@
'entity_id': 'sensor.henk_wakeup_count',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '350',
'state': '8',
})
# ---
# name: test_all_entities.32
@ -396,7 +396,7 @@
'entity_id': 'sensor.henk_wakeup_time',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '176.0',
'state': '3468.0',
})
# ---
# name: test_all_entities.33