Giter Club home page Giter Club logo

Comments (6)

joostlek avatar joostlek commented on August 28, 2024

Probably because it's inferred as a string. Please try simplifying to a single statement which just returns the expression

from core.

DOK87 avatar DOK87 commented on August 28, 2024

sorry, but I don't understand what test you want me to do.
I just tried to start the automation:

  • "switch.schedule_trigger_ac_on_2" state is "triggered"
  • "sensor.temperatura_salotto" is above 25°

but if I go to look at the automation traces, this condition has a false result. And I don't understand why.
If instead I go to the condition menu inside the automation, and click TEST, Home assistant returns message "condition pass"

This automation worked fine before the update.

from core.

joostlek avatar joostlek commented on August 28, 2024

Instead of if just return the expression directly, as something > something else already returns True

from core.

DOK87 avatar DOK87 commented on August 28, 2024

OK. Now I understand.
I just did these tests:

Sensor status:

  • "switch.schedule_trigger_ac_on_2" state is "triggered"
  • "sensor.temperatura_salotto" is above 25°

Template condition:
{% if (states('switch.schedule_trigger_ac_on_2') == "triggered") %}
true
{% endif %}

This condition result TRUE

Template condition:
{% if (states('sensor.temperatura_salotto') > '25') %}
true
{% endif %}

This condition result TRUE

Template condition:
{% if ((states('switch.schedule_trigger_ac_on_1') == "triggered") and (states('sensor.temperatura_salotto') > '25')) %}
true
{% endif %}

This condition result FALSE

from core.

joostlek avatar joostlek commented on August 28, 2024

{{ states('sensor.temperatura_salotto') > '25' }}

from core.

DOK87 avatar DOK87 commented on August 28, 2024

with the syntax you told me it works correctly

{{ (states('switch.schedule_trigger_ac_on_2') == 'triggered') and (states('sensor.temperatura_salotto') > '25') }}

thank you

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.