Switch automation not working

I have a Tuya switch which is hooked up to the system and I can manually turn it off and on with the webapp.

I want to turn off the switch when my feed in tarif (FIT) goes negative. To do that I have tried the following :

  • Create a new device automation.
  • Trigger : when FIT < 0
  • Condition: none
  • Turn off the switch

When I test it, it doesn’t work. Even after rebooting the system. When the FIT < 0 the switch stays on.
Can anyone tell me what I am doing wrong ?

thanks
Matt

Share the actual automation, not a bullet-point description of it.

Post the automation in properly formatted YAML.

The following IDs have been modified by hand :

alias: "off: fit < 0"
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.sloane_feed_in_price
    below: 0
condition: []
action:
  - type: turn_off
    device_id: 11111111
    entity_id: 22222222
    domain: switch
mode: single

Its ok - turns out the metric was in $ not cents !