Template sensor working but not visible

I am using the Samsung TV remote integration. Now I want to read if Netflix is selected. This is done with:

platform: template
sensors:
  samsung_tv_source:
    friendly_name: "Samsung source"
    value_template: "{{ state_attr('media_player.samsung_tv_remote', 'source') }}"

In the template test it works, but in HA this sensor does not show up, no errors, template sensor is correctly written or?

Any ideas?

not enough information.

do you have it entered under the “sensor:” domain key?

is it directly in your configuration.yaml or in another file location using !include?

1 Like

thnx, that did the trick! I also went to the modern way of the writing the template

template:
  - sensor:
      - name: Samsung source
        state: >
          {{ state_attr('media_player.samsung_tv_remote', 'source') }}
1 Like