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

Help with binary sensor - what am I doing wrong?

$
0
0

@steadi wrote:

Hi,

Been working on a binary sensor to show “on” when anyone of the household is at home. My attempts so far haven’t worked.

I have the following code:

- platform: template 
  sensors: 
    house_occupation_status:
      friendly_name: "Occupation status"
      value_template: >-
        {{ is_state('person.pete', 'home') or
        is.state('person.2', 'home') }}

The code above kept showing “on”, so created a simpler, test sensor to test if it actually worked.

- platform: template 
  sensors:
    test_sensor:
      value_template: >-
        {{ is.state('person.pete', 'home') }}

The test sensor is “off” all the time, even though I am at home. And my person is registered showing as home in HA.

I’m new to HA, so am having trouble deciphering where I’m going wrong - any help is appreciated.

Thanks,

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 101899

Trending Articles



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