No temp changes

I like to use the temperature to set a boolean for freeze warnings.
So i made a autoamtion that works when i execute it manual.
Problem is that it isnot activated by used trigger item weather.forecast_pvk , attribute temperature…
Look like the wether services only gives a trigger on weather.forecast_pvk states like rainy etc.
Is there a way to use temp changes as a trigger

alias: auto_vriezen
description: ""
trigger:
  - platform: numeric_state
    entity_id: weather.forecast_pvk
    attribute: temperature
    above: -15
    below: 40
condition: []
action:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: weather.forecast_pvk
            attribute: temperature
            above: 17
        sequence:
          - service: input_boolean.turn_on
            data: {}
            target:
              entity_id: input_boolean.vriezen
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: weather.forecast_pvk
            below: 17
            attribute: temperature
        sequence:
          - service: input_boolean.turn_off
            data: {}
            target:
              entity_id: input_boolean.vriezen
type or paste code here

Im guessing the temperature hasn’t gone from above 40 to below or from below -15 to above.

Just make two triggers (or 2 separate automations) with one below and one above 17. Then switch your helper on/off accordingly.

My guess just remove the above -15 below 40

Okay, i splitted the script in two parts below and above 16. The boolean works now.
Only remaining problem is (not for sure) that the temperature changes are only suplied when the weather.forecast_pvk state changes, for example from cloudy to rain.
I like to have the temperature changes independent of this state…

I will monitor this integration coming hours, and reply later, thanks for now :slight_smile:

ok, small update, dont understand it at all.
The card was updated, temp rised from 17.9 to 18.2 the state was the same: partialy cloudy.
So that seems to be good news, temp update while the state was the same!

Bad news is that my boolean did not activated > 16.
When i activated the two automation manualy, by clicking execute autoamtion, the boolan flips.
So fact is that the automations dont response to the triggerpart ?

my new scripts

alias: auto_vriezen_above
description: ""
trigger:
  - platform: numeric_state
    entity_id: weather.forecast_pvk
    attribute: temperature
    above: 16
condition: []
action:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: weather.forecast_pvk
            above: 16
            attribute: temperature
        sequence:
          - service: input_boolean.turn_on
            data: {}
            target:
              entity_id: input_boolean.vriezen


alias: auto_vriezen_below
description: ""
trigger:
  - platform: numeric_state
    entity_id: weather.forecast_pvk
    attribute: temperature
    below: 16
condition: []
action:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: weather.forecast_pvk
            below: 16
            attribute: temperature
        sequence:
          - service: input_boolean.turn_off
            data: {}
            target:
              entity_id: input_boolean.vriezen



It works! and thank you all…

A solution is:
- not to use numeric_state in the trigger…
- not to use below and above in the trigger
and use them in the conditions

alias: auto_vriezen
description: ""
trigger:
  - platform: state
    entity_id:
      - weather.forecast_pvk
    attribute: temperature
condition: []
action:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: weather.forecast_pvk
            attribute: temperature
            below: 16
        sequence:
          - service: input_boolean.turn_off
            data: {}
            target:
              entity_id: input_boolean.vriezen
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: weather.forecast_pvk
            attribute: temperature
            above: 16
        sequence:
          - service: input_boolean.turn_on
            data: {}
            target:
              entity_id: input_boolean.vriezen

I was about to say don’t put the above 16 in the trigger but you had already got there :slight_smile:

If you have above 16 it will only trigger when changing from below to above 16

yes, i used both advices, and also yours :slight_smile:
could only click one solution, but you helped me a lot understanding how HASS works…
I used domoticz for 10 years, and struggling about a month to get everything working in Hass, about 100 devices, ir, rf, zwave, cam, weather, garbage, irrigation…
Now try to understand the details of rfx, my next topic for help to fill my knowledge gaps…

Thanks again, it works like a charm !