Skip to content

v0.8.0 — Drop %-percentile sensors for bi-directional metrics

Choose a tag to compare

@redchupa redchupa released this 12 May 16:12

Korean infant/child reference data integration for Home Assistant.
Install via HACS → Custom repositories → https://github.com/redchupa/kr_baby_kit (Category: Integration).

A sensor whose state is a percent and whose "good" reading is 50% reads like "half-full" to most users. The v0.7.x label hints ("50%=정상") couldn't undo that mismatch, so v0.8.0 takes the underlying step and removes the offending sensors.

⚠️ Removed (BREAKING)

  • sensor.<child>_head_percentile
  • sensor.<child>_bmi_percentile
  • sensor.<child>_weight_for_length_percentile

Added

Three new device_class: problem binary sensors take their place:

Entity Meaning
binary_sensor.<child>_head_concern 머리둘레 양극단 주의 (microcephaly · macrocephaly)
binary_sensor.<child>_bmi_concern BMI 양극단 주의 (저체중 · 비만)
binary_sensor.<child>_weight_for_length_concern 신장별 몸무게 양극단 주의

Each is on when the KDCA statistical percentile is < 5 or > 95. Attributes carry the full picture:

Attribute Value
statistical_percentile 0–100
level low / high / null
summary_ko one-line Korean readout
value raw measurement (BMI float, or {length_cm, weight_kg, band} dict)
measured_at ISO date

Unchanged

  • sensor.<child>_height_percentile, sensor.<child>_weight_percentile — still 1%=가장 큼 (rank scheme is medically safe for single-direction-favorable metrics).
  • sensor.<child>_bmi_raw — raw BMI value sensor stays, with percentile/summary on its attributes.
  • All schedule, calendar, tuition, and number-input entities.

Automation example impact

Example #4 (BMI 양극단 알림) rewritten as a state trigger:

trigger:
  - platform: state
    entity_id: binary_sensor.kr_baby_kit_<child>_bmi_concern
    to: "on"

…much simpler than the previous dual numeric_state form.

Upgrade notes

  • unique_id of every retained entity is unchanged — existing entity_ids stay.
  • The three removed *_percentile entities will appear in HA's "Unavailable entities" list after upgrade; they can be safely deleted from the entity registry.
  • Any automation that triggered on numeric_state of the removed sensors should be rewritten against the new binary_sensor.*_concern state trigger.

Full CHANGELOG: CHANGELOG.md