WAIT Template for automation

Hi all,

I’m utilising surplus PV power of my house to switch additional smart devices (underfloor heating mainly).

Wondering if the following ‘wait’ template will work? Essentially once the grid sensor sees anything above 10w it’ll fire the next event (switching off stuff again).

Here’s what I have in my automation:

wait_template: numeric_state.sensor.iammeter_power > 10

Or is more detail needed?

Thanks,
Matt

Yes. It has to be formatted as a jinja template:

wait_template: "{{ states('sensor.iammeter_power')|float > 10 }}"

Or you can use a wait_for_trigger:

  wait_for_trigger:
    - platform: numeric_state
      entity_id: sensor.iammeter_power
      above: 10

Fantastic. Thanks for the prompt reply. This is perfect. Many thanks. -matt