Request suggestion for template sensor in Homekit


I created a CLIP sensor in my Huebridge that remembers the last light level (dark or light) when the lights in the room are not on. With a REST sensor I read the sensor state in HA and a template sensor to integrate it nicely in Lovelace.

# ------------------------------------------------------------------------------
# Philips Hue CLIP Sensors (Generic memory sensors)
# ------------------------------------------------------------------------------
# CLIP Sensor Buanderie Dark
  - platform: rest
    name: CLIP Buanderie is Dark
    value_template: '{{ value_json.state.flag }}'
    scan_interval: 10
# Buanderie CLIP Sensor Template
  - platform: template
        unique_id: clip_buanderie_dark
        friendly_name: "HM4 Buanderie Ambient Status"
        value_template: >-
          {% if is_state('sensor.clip_buanderie_is_dark', 'True') %}
          {% else %}
          {% endif %}
        icon_template: mdi:theme-light-dark

This is all working fine.

Now I like to integrate the sensor in Homekit to use it for automations but Homekit doesn’t see the sensor (or CLIP). I think i’m using a sensor that is not supported by Homekit?

Could anyone tell me what would be a good solution to get the CLIP sensor state in Homekit?

Been trying to find a solution without much success.

I could add the sensor as a switch in homekit but it’s not really consistent with what it is. I prefer to have a sensor with true/false or on/off state.

Is this possible?