HealthKit sensors without any samples are registered and stay unavailable (iPhone without glucose/temperature data, iPad)

オープン
#6,327 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
56/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
swift
領域
mobile

調査の方向性

Start by locating the HealthKit sensor registration and sample availability handling in the iOS app; the issue does not name the files or tests. Check how supported HealthKit types are registered when they have no samples or read access, then decide which expected behavior fits the project. Done means types with no applicable data no longer appear as permanently unavailable, with relevant behavior covered by tests.

索引モデルが issue の本文から書いたものです。

説明

iOS device, version and app version

  • iPhone (iPhone19,2), iOS 27.3, app 2026.11.0 (2026.3388)
  • iPad Pro 12.9" (iPad8,11), iPadOS 27.3, app 2026.11.0 (2026.3388)

Home Assistant Core Version

2026.12.0b2

Describe the bug

The HealthKit sensors are registered for every supported type, also when the device has no samples of that type (or no Health data at all). Those sensors then stay unavailable forever:

  • iPhone: basal_body_temperature, body_temperature, blood_glucose (no device that measures these is paired, so HealthKit has no samples)
  • iPad: all 17 health sensors (heart_rate, weight, vo2_max, blood_pressure_*, respiratory_rate, blood_oxygen, in_bed, …) — the iPad is not a health data source

unavailable is the state for "cannot reach the device", so these show the warning mark and end up in every "unavailable entities" list, next to real problems.

To Reproduce

  1. Install the app on an iPhone without, for example, a glucose meter, or on an iPad.
  2. Grant Health access (or not).
  3. The sensors for types without samples are created and stay unavailable.

Expected behavior

One of:

  • only register a HealthKit sensor once the type has at least one sample (and/or read access was granted), or
  • report unknown instead of unavailable when there is simply no sample yet.

Additional context

Related: #6293 (hinge/pose sensors registered on a non-foldable iPhone/iPad, same pattern). General discussion about "not applicable" vs "unavailable": home-assistant/feature-requests discussion #5752.

主要言語
Swift
スター
2.4k
フォーク
583
平均マージ
1日 10時間
マージ済み PR(30日)
82

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

home-assistant/iOS のほかの issue

home-assistant/iOS の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。