junkfix / numberbox-card

Replace input_number sliders with plus and minus buttons
109 stars 9 forks source link

compare values in secondary_info #74

Closed MrThiemann closed 1 year ago

MrThiemann commented 1 year ago

Hey,

can someone explain to me how I can compare two values ​​in secondary_Info?

i have a sensor (sensor.Test ) and a helper (input_number.test).

if both are the same then ok if different then xxx

somehow I can't get it to use an if is_state template here.

htmltiger commented 1 year ago

It is possible by creating a template sensor https://www.home-assistant.io/integrations/template/

template:
  - sensor:
      - name: "Sun State"
        state: >
          {% if is_state('sun.sun', 'above_horizon') %}
            up
          {% else %}
            down
          {% endif %}