Help Using Numeric State for Automations Failure

Hi

I have started working on using automation within HA, have managed to get door sensors to work as triggers andf eel comfortable with that. My latest attempt is to turn off my dihswasher off when it is less than 3watts after x amount of time. I did a lot of searching and between the UI and yaml editing I came up with the bit below. Only it is not working. It never triggers despite the dishwasher plug being on and at below 5 watts for the last hour.

Here is the Yaml stuff

"alias: Dishwasher Auto Off
description: “”
trigger:

  • platform: numeric_state
    entity_id: sensor.smart_plug_mss310_power_w_main_channel_3
    for:
    hours: 0
    minutes: 3
    seconds: 0
    below: 5
    condition: []
    action:
  • type: turn_off
    device_id: device id
    entity_id: entity id
    domain: switch
    mode: single"

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

A Numeric State Trigger will trigger at the moment when your sensor’s value changes from above 5 to below 5. It’s the crossing of the threshold value (5) that serves to trigger the Numeric State Trigger.

So, lousy newbie copy and paste job aside, the above should work once the appliance has finished its cycle on its next run? And thank you so much for help :slight_smile:

Thank you, will remember that next time because no doubt there will be lots of next times :slight_smile: lol