Help with an automation trigger to run an auxillary fan

Hi

I am trying to do something that seems really simple but it’s just not working…its an automation.

Input : when solar power being generated is more then 2000w

Then: turn on a switch (that Has a fan on it to provide extra cooling to my inverter).

Attempt 1: using the trigger of a numeric value…I put in the entity id and 2000

Nothing happens.

Attempt 2: using the threshold helper I made a helper called ‘solar’, told it to become ‘on’ when the solar energy being produced is over 2000…
I created an entity id card that definitely shows on if it is above 2000 and off if below …

However I can’t seem to get it working in automations to trigger turning on the fan.


What am I doing wrong ?

In the first and second screenshot’s Attribute field, what is this value named ‘Sensor value’? That looks like something random you typed into the field. Remove it.

Note:
When sharing information with the community, it’s preferable to post the YAML produced by the Automation Editor as opposed to screenshots (it’s mentioned in the FAQ and, if you look around this forum, that’s what most users do).

alias: New Automation
description: ‘’
trigger:

  • platform: state
    entity_id: binary_sensor.solar
    to: ‘On’
    condition: []
    action:
  • type: turn_on
    device_id: dd185e6b86c072965a871993186eac50
    entity_id: light.lounge_mains_socket_on_off
    domain: light
    mode: single

Sorry.

Is that ok like that…?

The state for your binary sensors needs to be ‘on’ not ‘On’…

Hi

I think that’s fixed it.

Thanks very much.

I wish there was somewhere easy to learn yaml as it seems such an easily fixable mistake…