KNX and Template Sensors are not exposed to HomeKit

Hi.

I want to expose my KNX sensor to Apple Homekit. While KNX-Lights and Covers are exposed automatically, I wasn’t able to manage it with KNX-Sensors and also not with templates.

For example I have an KNX temperature sensor:

knx:
  sensor:
    - name: "Gartenraum-Temperatur"
      state_address: "3/5/0"
      type: temperature

I can see the Entity within the HA-UI and it shows the right temperature with the right unit “°C”, but it is not exposed to HomeKit. I have also tried to set the device-class manually: device_class: temperature.

Then I have tried to use a template - as the HomeKit-Docu say, we need to use:

All sensors that have °C or °F as their unit_of_measurement and temperature as their device_class.

My template looks like:

template:
  -sensor:
    - name: "Gartenraum-Temperatur-HomeKit"
      unit_of_measurement: "°C"
      device_type: temperature
      state: "{{ states('sensor.gartenraum_temperatur') }}"

Again I can see the entity in the HA-UI with right values. But it is not exposed to HomeKit.

What I’m doing wrong?

Hi :wave:!
Did you check your HomeKit configuration if sensor entities are selected to be exposed?

Do I need to include / select them manually? I read in the HomeKit-Doc HomeKit Bridge - Home Assistant that all entities are included automatically:

By default, all entities except categorized entities (config, diagnostic, and system entities) are included.

and

No filter > All entities included

I don’t have any manual HomeKit configuration. I added it with the auto-discovering.

I’m not sure about the defaults. Just have a look here

Further, I think it should read device_class instead of device_type here, but you should not need a template sensor for this in the first place.

Thank you! I wasn’t aware that I can configure there anything with the auto-discovery.

Now the sensor and much more are showing up. Thank you!

1 Like