Documentation

Understand your health entities

See what each kind of entity contains, where detailed information is stored, and how to use it in dashboards and automations.

The basics

States hold the headline. Attributes hold the detail.

Most health metrics are simple numeric sensors. The state is the value you will normally display or use in an automation, such as steps, heart rate or sleep duration.

Numeric metric sensor.heart_rate_greg 72 bpm

The current reading is the entity state.

Rich entity sensor.last_apple_workout_greg Outdoor Run · 34 min · 5.2 km

The state is a summary. Individual values are attributes.

Your entity names

Entities normally follow sensor.<metric>_<user>. For example, the user greg receives sensor.steps_greg. Replace greg in the examples below with the suffix shown in your own Home Assistant entity ID.

Where to see attributes

In Home Assistant, open Developer tools → States, search for the entity, and look below its state. Attributes can also be read in templates with state_attr().

{{ state_attr('sensor.last_apple_workout_greg', 'distance_km') }}

Workouts

The latest workout is one detailed sensor

sensor.last_apple_workout_<user> contains the most recently synced Apple Workout. Its state is a readable summary assembled from the details that workout provides.

Example state Outdoor Run · 34 min · 5.2 km · 412 kcal · 148 bpm

Distance, energy and heart-rate parts are omitted when the workout does not contain them. A strength workout, for example, may have duration and energy but no distance.

AttributeWhat it contains
workout_idThe workout’s stable Apple Health identifier.
workout_typeA friendly activity name such as Outdoor Run, Strength Training or Yoga.
start_timeThe workout start time.
end_timeThe workout end time.
duration_sDuration in seconds.
duration_minRounded duration in minutes.
active_energy_kcalActive energy in kilocalories, when available.
distance_mDistance in metres, when available.
distance_kmDistance in kilometres, when available.
average_heart_rate_bpmAverage heart rate, when available.
max_heart_rate_bpmMaximum heart rate, when available.
sourceThe app or device that recorded the workout, such as Apple Watch.
route_availableWhether the workout indicates an outdoor route is available. Route coordinates are not exposed.
summaryA shorter human-readable workout summary.
last_syncedWhen Health Assistant Link last sent the workout.

Use workout details in a template

Distance: {{ state_attr('sensor.last_apple_workout_greg', 'distance_km') }} km
Average HR: {{ state_attr('sensor.last_apple_workout_greg', 'average_heart_rate_bpm') }} bpm
Started: {{ state_attr('sensor.last_apple_workout_greg', 'start_time') }}

Current behaviour: this entity holds the latest workout. It is not a browsable workout-history or calendar entity.

Sleep

Totals, clock times and the full sleep-stage timeline

Sleep is split across several entities so you can use simple totals and detailed stages independently.

EntityWhat it contains
sleep_durationTotal sleep duration in hours.
sleep_rem_hoursREM sleep duration in hours.
sleep_core_hoursApple Core, or light, sleep duration in hours.
sleep_deep_hoursDeep sleep duration in hours.
sleep_awake_hoursTime awake during the sleep session, in hours.
sleep_unspecified_hoursSleep Apple recorded without a Core, Deep or REM stage.
asleep_timeThe start of sleep as a Home Assistant timestamp.
wake_timeThe end of sleep as a Home Assistant timestamp.
sleep_detailsA stage-by-stage history series used to draw a hypnogram.

Sleep Details stage values

-1 Unspecified 0 Deep 1 Core 2 REM 3 Awake

sleep_details is meant to be read across its Home Assistant history, not as a single current number. The ready-made Sleep Details tile converts those stage codes into the familiar sleep chart.

Get the Sleep Details dashboard tile →

Asleep and wake time attributes

The timestamp is the entity state. These entities also provide seconds_since_midnight, formatted_time, recorded_local_time and recorded_at attributes for cards and automations.

Medications · iOS 26+

One entity for each enabled medication

Medication entities follow sensor.medication_<stable-id>_<user>. Their state gives today’s adherence at a glance:

pendingNo doses taken today partialSome scheduled doses taken takenAll known scheduled doses taken
AttributeWhat it contains
nameThe medication’s display name.
takenNumber of doses recorded as taken today.
scheduledExpected number of doses today, or 0 when no total is available.
skippedNumber of doses recorded as skipped today.
has_scheduleWhether Apple Health has a schedule for the medication.
summaryReadable text such as “2 of 3 taken”.
dose_takenTotal quantity taken today, when available.
dose_scheduledTotal quantity scheduled today, when available.
unitThe dose unit, when available.
latest_statusThe latest Apple Health dose-event status, when available.
{{ state_attr('sensor.medication_your_id_greg', 'summary') }}
{{ state_attr('sensor.medication_your_id_greg', 'dose_taken') }}
{{ state_attr('sensor.medication_your_id_greg', 'unit') }}

Two-way sync

Send Home Assistant values to Apple Health

Health Assistant Link can read a numeric Home Assistant entity and save its value as a supported Apple Health quantity. Each pairing connects one Home Assistant entity to one Apple Health metric.

Home Assistant entityHealth Assistant LinkApple Health metric

Set up a pairing

  1. 1
    Open HA to Apple

    In Health Assistant Link, select the HA to Apple tab.

  2. 2
    Add a Home Assistant API token

    If prompted, create a Long-Lived Access Token from your Home Assistant profile under Security, then paste it into the app. This lets the app read the entities you choose.

  3. 3
    Tap + and choose an Apple Health metric

    Metrics that cannot be safely written from a single numeric value are disabled in the list.

  4. 4
    Choose the Home Assistant entity

    Select the numeric entity whose value should be written to that Apple Health metric.

  5. 5
    Allow Apple Health write access

    Accept the permission request for the selected metric. The pairing then runs during permitted syncs.

Avoiding sync loops

Health Bridge’s own entities cannot be selected as the source for a reverse pairing. Use an entity created by another integration, helper, template or device.

How values are written

Measurements

For readings such as weight, temperature or blood pressure, the full numeric entity state is written when Home Assistant reports a newer update.

Daily totals

Cumulative metrics such as steps, energy, distance and nutrition are written incrementally to avoid duplicated totals.

Percentages

Human-scale Home Assistant percentages such as 21.5 are converted to Apple Health’s fractional format automatically.

Use the expected unit

The pairing uses the number in the entity state. Choose or create an entity whose value already matches the selected Apple Health metric’s expected unit.

Apple Health targetExpected Home Assistant value
Body weight and lean body massKilograms
Distance, height and waistMetres
WaterMillilitres
Heart and respiratory ratesCounts per minute, such as bpm
Blood pressuremmHg
Blood glucosemg/dL
TemperatureDegrees Celsius
Percentages0–100; conversion is automatic

The Home Assistant unit label is shown when choosing an entity, but it is not used to convert the number. If the units differ, create a Home Assistant template sensor with the correct value first.

When does it write?

Enabled pairings are checked during permitted syncs. Only new Home Assistant updates are written, helping prevent duplicate Apple Health samples while preserving when the source value changed.

Values and history

Current state and when it was recorded

For ordinary metrics, the entity state is the latest synced value. The recorded_at attribute preserves when Apple Health says that reading occurred, which can differ from the time Home Assistant received it.

Daily totals

Metrics such as steps, active calories, distance and nutrition normally represent today’s accumulated total.

Latest readings

Metrics such as heart rate, weight, blood oxygen and temperature normally represent the latest available sample.

Automatic backfill

When enabled, recent numeric readings are added to detailed Home Assistant history with their original timestamps. Manual backfill can cover up to 14 days.

Backfilled readings appear in detailed entity history. They do not rewrite Home Assistant’s already-completed long-term statistics periods.

Common entity groups

Activity and movement

steps, distance, active_calories, exercise_time, stand_time, flights_climbed, walking metrics, cycling distance, swimming distance and wheelchair metrics.

Vitals and body measurements

Heart rate, resting heart rate, HRV, blood oxygen, respiratory rate, blood pressure, blood glucose, temperature, weight, body fat, lean body mass, VO₂ max and more.

Sleep and recovery

Sleep duration and stages, asleep and wake times, sleep details, mindful minutes, cardio recovery and physical effort.

Nutrition

Energy, water, protein, carbohydrates, fat, fibre, sugar, caffeine, vitamins and minerals. These are generally today’s accumulated totals.

Environment and exposure

UV index, UV exposure, time in daylight, headphone audio exposure and environmental audio exposure.