Wait … there’s an error here … gimme 5 Okay, good to go …
You will need to set up time and date sensors, see -
Taking @Burningstone 's binary_sensor as a start point : -
[the below assumes binary_sensor.ace_bin_sensr and automation.dumb_trigger]
binary_sensor:
- platform: template
sensors:
ace_bin_sensr:
friendly_name: "Fab Trigger for Other Stuff"
value_template: >
{# the '>' above tells you to expect a multi-line template rather than a single line #}
{# this like the line above is a comment and doesn't do anything #}
{# The line below is an evaluation statement and is only valid during this template's life, usually ~ half a millisecond #}
{% set tme = states('sensor.time') %}
{# let's get the date as well (value not actually needed but ... ) #}
{% set dte = states('sensor.date') %}
{# and when did that last change ? #}
{% set dtechg = as_timestamp(states.sensor.date.last_updated) %}
{# the following does a TEXT comparison to see if the time is between the required limits #}
{% set tgud = '06:30' <= tme <= '08:30' %}
{# so is the temperature below the trigger limit ? #}
{% set temp_low = states('sensor.outdoor_temperature') | float < 1 %}
{# now we only care about if the automation has been fired since midgnight so when was it last fired ? #}
{% set lst_frd = as_timestamp(states.automation.dumb_trigger.attributes.last_triggered) %}
{# and if never yet fired set it to epoch start #}
{% set frd = 0 if as_timestamp(states.automation.dumb_trigger.attributes.last_triggered) | string == 'None' else lst_frd %}
{# and is that before midnight just past ? #}
{% set firstofday = frd < dtechg %}
{# the line below is a print statement and is the output of ALL the above #}
{{ firstofday and tgud and temp_low }}
delay_on: "00:30:00"
Provided this is called binary_sensor.ace_bin_sensr and the messaging automation is called automation.dumb_trigger this will only fire if it’s the first of the day and the temp is below -1 degree and it’s been that way for 30 mins
The automation triggers on this sensor going to ‘on’ from ‘off’ - it then just needs to carry your payload.
once working change the names (in all instances) to suit your requirements
Couldn’t test this but lets see what your config check etc. says
Condensed version : -
binary_sensor:
- platform: template
sensors:
ace_bin_sensr:
friendly_name: "Fab Trigger for Other Stuff"
value_template: >
{% set tme = states('sensor.time') %}
{% set dtechg = as_timestamp(states.sensor.date.last_updated) %}
{% set tgud = '06:30' <= tme <= '08:30' %}
{% set temp_low = states('sensor.outdoor_temperature') | float < 1 %}
{% set lst_frd = as_timestamp(states.automation.dumb_trigger.attributes.last_triggered) %}
{% set frd = 0 if as_timestamp(states.automation.dumb_trigger.attributes.last_triggered) | string == 'None' else lst_frd %}
{% set firstofday = frd < dtechg %}
{{ firstofday and tgud and temp_low }}
delay_on: "00:30:00"
Given this set up you will NEVER get a notification before 07:00 as you request this to be valid from 06:30 and to wait 30 minutes