Custom Sensor for HomeKit

Hi,

I’m new to Home Assistant.
I wanted to add a sensor for current and daily temperature to use this information for automations inside HomeKit.
I created some sensors and got them working for Home Assistant, and they show up in HomeKit, but the temperature sensors are not reachable. The binary sensors are working fine.

Attached are my configuration and a screenshot of the sensor inside HomeKit.


template:
  - trigger:
      - platform: time_pattern
        hours: /1
      - platform: homeassistant
        event: start
    action:
      - service: weather.get_forecast
        target:
          entity_id: weather.forecast_home
        data:
          type: hourly
        response_variable: forecastHourly
    binary_sensor:
      - name: Regnet es?
        state: "{{ forecastHourly.forecast[0].precipitation > 0 }}"
    sensor:
      - name: Wetter stündlich
        state: "{{ forecastHourly.forecast[0].temperature | default(0) }}"
        availability: "{{ is_number(forecastHourly.forecast[0].temperature) }}"
        unit_of_measurement: "°C"
        device_class: temperature
  - trigger:
      - platform: time
        at: "00:00:00"
      - platform: homeassistant
        event: start
    action:
      - service: weather.get_forecast
        target:
          entity_id: weather.forecast_home
        data:
          type: daily
        response_variable: forecast
    binary_sensor:
      - name: Wird es regnen?
        state: "{{ forecast.forecast[0].precipitation > 0 }}"
    sensor:
      - name: Wetter täglich
        state: "{{ forecast.forecast[0].temperature | default(0) }}"
        availability: "{{ is_number(forecast.forecast[0].temperature) }}"
        unit_of_measurement: "°C"
        device_class: temperature

Perhaps someone can point me in the right direction.

I believe I’ve identified the issue. HomeKit was not accepting special characters within the sensor name.