{% extends "base.html" %} {% from "macros.html" import card_header %} {% block body %}
{{ card_header(nickname, icon_url, date, "😴 睡眠") }} {% if data.total_duration > 0 %}
睡眠评分
{{ data.sleep_score }}/100
总时长 {{ duration_str(data.total_duration) }}
睡眠结构
{% set total = data.sleep_deep_duration + data.sleep_light_duration + data.sleep_rem_duration + data.sleep_awake_duration %} {% if total > 0 %}
{% endif %}
深睡 {{ duration_str(data.sleep_deep_duration) }} 浅睡 {{ duration_str(data.sleep_light_duration) }} REM {{ duration_str(data.sleep_rem_duration) }} 清醒 {{ duration_str(data.sleep_awake_duration) }}
{% if data.avg_hr > 0 or data.avg_spo2 > 0 %}
{% if data.avg_hr > 0 %}
睡眠心率 {{ data.avg_hr }} bpm
{% endif %} {% if data.avg_spo2 > 0 %}
睡眠血氧 {{ data.avg_spo2 }}%
{% endif %}
{% endif %} {% else %}
暂无睡眠数据
{% endif %}
{% endblock %}