Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 109884

Problems with template

$
0
0

Hello

I’m trying to track my phone using the android app and ibeacons. It all works but having problems with a template for the binary sensor. The value works in dev, but I keep getting this error

Configuration warnings
Invalid config for 'template' from integration 'binary_sensor' at binary_sensor.yaml, line 53: 'state' is an invalid option for 'binary_sensor.template', check: sensors->beacon_detected->state

I have this in binary_sensor.yaml

  - platform: template
    sensors:
      beacon_detected:
          friendly_name: Beacon Detected
          device_class: presence
          value_template: >-
          state: >
            {% if (state_attr('sensor.marks_s22_ultra_beacon_monitor', 'a0b13730-3a9a-11e3-aa6e-0800200c9a66_56780_63704') != None) 
            %}
              on
            {% else %}
              off
            {% endif %}

Any ideas please? It has been a long time since I played with my HA yaml

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 109884

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>