Automation, read meteo conditions from default HA meteo service

Just trying to read meteo conditions based on a post I read. I try to read the ID provided there but these doesn’t seems to trigger. Below my code. I say over 4 the weather is bad and I turn on boolean.
Bad approach?

- id: '1111175202183'
  alias: Rain Start
  description: ''
  trigger:
  - entity_id: weather.homecr
    from: '5'
    platform: state
    to: '50'
  condition: []
  action:
  - data:
      entity_id: input_boolean.bad_weather
    service: input_boolean.turn_on

What that says is that when weather.homecr changes from a state of 5 to a state of 50 to trigger the automation. That’s not what you described though, you described a numeric state trigger like:

  trigger:
  - platform: numeric_state
    entity_id: weather.homecr
    above: 4

This of course won’t trigger if the value is already above 4 at startup, so maybe:

  trigger:
  - platform: numeric_state
    entity_id: weather.homecr
    above: 4
  - platform: homeassistant
    event: start
  condition:
  - condition: numeric_state
    entity_id: weather.homecr
    above: 4
  action:
    ....

Thanks for your help: I thought it was something like “between”. Sorry, I’m from the “if then else” generation, just migrated from my Vera (luup) so I have to learn/adapt myself to HA syntax, totally new to me.
And what would be the syntax just to track “Rainy” condition? Something like

weather.homecr.condition

Templates. I’d personally recommend using a template sensor like:

sensor:
  - platform: template
    sensors:
      weather_condition:
        friendly_name: "Weather condition"
        value_template: "{{ state_attr('weather.homecr', 'condition') }}"

That then gives you an entity you can just use, in this case sensor.weather_condition (but see here).

1 Like

hi, just did this, but the value displayed now is “None”.

weathercondition

ok it was:

value_template: "{{ states('weather.homexxx') }}"