Add notification when temperature has been below 0


I have a temperature sensor outside, feeding hassio thrue a tellstick duo. Iwould like it to notify me if the temperature has been below zero for a week, is that possible?

Not sure exactly what kind of sensor you are using, but shouldnt the following work?

  - platform: numeric_state
    entity_id: sensor.temp_outside
    below: 0
      days: 7

I have not tested using “days” in the “for”-statement, but is is supposed to be a timedelta, so it should work…

What @Olen posted should work fine. However, you need to make sure that Home Assistant is not restarted within the 7 days, otherwise it will not work as far as i know.

Hmm but what if the temp rise above 0 for 1 Day?
Does the counter restart then?
I have a telldus hygrometer as a sensor and some time i have to restart ha. Is it possible to store the value in a database and then read it out and use it in ha?

The “counter” will stop as soon as the value goes above 0 and will only start again (from beginning, it will not continue) once it goes below 0 after being above 0.

You could probably use a statistics sensor, but what exactly do you want to automate with this?

Well i have a greenhouse and it use to stay above 3-4 °C inside, but when the temperature outside stays below 0 for about a week the temperature inside goes below 0, and then i want to start the heating basicly. The heating starts with telldus poweroutlet in the garage (i have cabel between and The greenhouse) . I can’t put a sensor in The greenhouse because the distance is too far away, so it would been great to tigger the outlet with the temperature sensor… I think