• 1 Post
  • 6 Comments
Joined 6 months ago
cake
Cake day: June 3rd, 2024

help-circle





  • I found the solution. configuration.yaml needed to have the following syntax, with the defined values being true or false (instead of “Detected” or “Not Detected”):

    template:
      - binary_sensor:
          - name: "Lounge Presence"
            state: >-
              {% if states('sensor.apollo_mtr_1_cca750_presence_target_count') | int > 0 %}
                true
              {% elif is_state('binary_sensor.apollo_msr_2_c7bfe8_radar_zone_1_occupancy', 'on') %}
                true
              {% elif is_state('binary_sensor.apollo_msr_2_c7bfe8_radar_zone_2_occupancy', 'on') %}
                true
              {% elif is_state('binary_sensor.apollo_msr_2_c7bfe8_radar_zone_3_occupancy', 'on') %}
                true
              {% else %}
                false
              {% endif %}
            device_class: presence