Sensor don't sync over to HomeKit

Hello,

I recently set up a sensor which i’m trying to appear in HomeKit. The sensor seem to work as when I check under developer tools>states in HASS I can see the sensor. As well as when I go to devices and setup my HomeKit integration I can select the sensor and sync it over to HomeKit. Though when I open the home application on my iPhone the sensor don’t show up.

This my code for my sensors, the sensor i’m talking about that’s giving me trouble is “Watch Procent” But I choose to include both here in case there some error with my configuration.

template:
  - sensor:
      - name: "AC Set Temperature"
        unit_of_measurement: "°C"
        state: '{{ states.input_number.temperatureac.state | round(1, default=18) }}'
  - sensor:
      - name: "Watch Procent"
        unit_of_measurement: "%"
        state: '{{ states.input_number.watchbattery.state | round(1, default=18) }}'

Kind regards Julian

It could be that the HomeKit integration doesn’t know what to do with them since the type is not set. See if adding the device_class: parameter helps, that allows HomeKit to know what to do with it, otherwise it’s just a basic value with no context.

Hi, sorry for a bit delayed response I’ve been stuck with studies.

I tried to change device class to battery which did not work, however I looked around and tried to change which unit it measures, to degrees. This is the only way I managed to make it work.

    unit_of_measurement: "°C"

Tho this sensor is not for degree but its the only way I can make it sync over to HomeKit, I would like to have the unit as % but it don’t seem to recognize this even tho it can handle % when it comes to another sensor, like a humidity sensor.

Do you have any ideas on how to make it work?