Template sensor entity not visible (anywhere)

Hi folks,

I have this interesting situation w/template(s). I am trying to explain this through my 2 examples in place:

So I have both of the following configurations in configuration.yaml in place:

1:

template:
  - binary_sensor:
      - name: site.people_home
        state: >
          {{ is_state('person.gilf0y', 'home')
             or is_state('person.wifey', 'home')
             or is_state('binary_sensor.site_sensor_door', 'on') }}

2:

template:
  - sensor:
      - name: site.outerdoor_state
        state: >
          {% if is_state('binary_sensor.site_sensor_outerdoor', 'off') %}
            armed
          {% elif is_state('binary_sensor.site_sensor_outerdoor', 'on') %}
            disarmed
          {% else %}
            failed
          {% endif %}

So - I can get the first (1) sensor entity I created visible everywhere and its usable. Its pretty much copy & paste from HA template documentation. So that works.

Based on that, I figured out that why not to create sensor entity (2) that would tell me things in bit different words I need in further processing. That site.outerdoor_state never shows up in anywhere, not on developer entities or logs either. It seems to be correctly done, since no errors. I copied most of the stuff so I bet someone is using alike.

HOWEVER - that works on Template “tester” under developer tools.

Someone able to tell what ‘magic’ is needed to make such sensor entity visible on entity lists etc? I tried to change between binary/sensor etc. - no dice. Help appreciated :slight_smile:

Hi there, the issue could be with the name that you have used in the configuration. Please try the following.

template:
  - binary_sensor:
      - name: "site_people_home"
        state: >
          {{ is_state('person.gilf0y', 'home')
             or is_state('person.wifey', 'home')
             or is_state('binary_sensor.site_sensor_door', 'on') }}
    sensor:
      - name: "site_outerdoor_state"
        state: >
          {% if is_state('binary_sensor.site_sensor_outerdoor', 'off') %}
            armed
          {% elif is_state('binary_sensor.site_sensor_outerdoor', 'on') %}
            disarmed
          {% else %}
            failed
          {% endif %}

Oh yeah! Apparently configuration does NOT like the (.) ‘dot’ in name, but on certain cases it does not mind whilst you have it there. Bug? Feature? - anyway. Solution. Big thanks :slight_smile: