Hi! About openweather api "condition"

Hello! Hi everyone. I would like to know if you can refer me to a thread that has already been asked about this, and if not, the question is the following:

How can I create an automation or a scene so that when in the openweather API, in the “condition” entity I put for example, rain or snow, I can extract that field to use it as a trigger to lower my blinds, for example? Thank you very much in advance. The idea is to do it without code, in the Lovelace editor, unless there is no other option, I am learning and I do not have much time. Thank you very much, colleagues.

Hi Fernando,

Here’s some searching advice.

1 Like

You should just need to use a State trigger. The state of a weather entity is normally the weather condition you are looking for.

Almost all answers you are going to get on this and other forums will be in YAML because there is no more efficient way for us to share the necessary data. If you need a primer on transcribing YAML automation configuration to the UI Editor there is a slightly dated video available here.

1 Like

Well, Start from the begining!.

Do you think this is ok?

trigger: state
entity_id:
  - sensor.openweathermap_condition
from: null
to: rainy

Thanks in advance, It won’t rain here now, ha ha ha ha.

Yes, that looks fine.

This is the entire yaml, the “when” and the “then”:

trigger: state
entity_id:
  - sensor.openweathermap_condition
from: null
to: rainy
--------
action: scene.turn_on
metadata: {}
target:
  entity_id: scene.bajar_todas_las_persianas

I don’t doubt that it works, but I wonder why all the possibilities of the attribute don’t appear in a list, and it has to be written by hand. I don’t know if it will recognize it when it is triggered, because I have noticed the values ​​of the statistics of that attribute (I’m Spanish)

It’s likely the integration developers did not include that data in the sensor. It should be available in the drop-down if you use the weather entity instead.

As far as I am aware, the values from the Weather integration docs are what you should use.

Thank you, but I don’t understand what you’re saying.

If I put the entire range of values, or some of them, written the same way in stats, and suddenly the state changes from one to the one set in the trigger, would it be executed?

Thanks in advance

Hi anyone can help?

I don’t understand what you are asking…


Since I don’t know, because the values ​​are not in the drop-down list, if we put any value (obviously the one we are interested in) that can go through the values ​​it is taking, we know if it would be executed.

From what you have posted it looks like it’s using the standard values, untranslated… so the values available to use would be:

  • clear-night
  • cloudy
  • fog
  • hail
  • lighting
  • lightning-rainy
  • partlycloudy
  • pouring
  • rainy
  • snowy
  • snowy-rainy
  • sunny
  • windy
  • windy-variant
  • exceptional