HomeAssistant read-only entities (iOS Health Sync)

Hi everyone,

I’m using HA since some time, and I recently wanted to have my “step count” on HomeAssistant. I have those values in my Health app (iOS). They come from a Mi Band smart band, and from the original app that sync data with Health app.

I’m using this app to synchronise data to HomeAssistant, and having three options : HomeAssistant sync, REST API or MQTT. For easy of use, I started using HomeAssistant integration.

As soon as I entered correctly my HA information, data can be synced with HA without any problem.

The two entities

This works, but I have some questions (cf. screenshot) :

  • The automation automatically created me two entities, hae.hasyncpersonname_step_count and hae.hasyncpersonname_step_count
  • Those two entities are read-only and do not have an unique_id (says HomeAssistant)
  • When I reboot my HomeAssistant, history for other entities remain (saved in database file?) but history for those two entities disappear. Entities become unavalaible until the next sync.

So :

  • What could I do to declare those two entities correctly ?
  • How to persist data of those two entities correctly, so any HA reboot does keep the history of those entities ?

If you see where am I having trouble understanding the difference between those entities, dynamically created, and other entities in HA.

Thanks a lot.