How to extract number value?


I read a KNX scene_value via KNX. In Homeassistant this is represented as number entity number.scene_knx.
When I look at my entities I can see it and it displays the correct values. Everything Is fine so far.

Now I want to use the value within a template binary sensor. If the scene has a specific number the binary_sensor should be true. But I fail

is_number(number.scene_knx) is always FALSE.
There seems to be no way to extract the value, I can only set a value.

I think I am missing a small part in the puzzle. I doing something wrong. Could you please give me an Idea how to proceed?


You want to use the state of that entity. Have a look at - especially the “States” paragraph.

  {% if is_state('number.charge_limitation', '70.0') %}
    too low
  {% elif is_state('number.charge_limitation', '80.0') %}
  {% else %}
  {% endif %}
{{ is_number(states('number.scene_knx')) }}

You’re asking if an undefined variable called number.scene_knx is a number, which it isn’t.

Thanks a lot. Got it working. No I need to find out how to filter out unwanted scenes. The binary sensor should react to certain scenes