Your automation will only trigger when your battery state goes from below 98 to above 98 % SOC and then the actions will only occur if your input power is above 3000 W.
Also while easy for beginners device automations have a major problem and you should avoid them.
Ok so, the automation will only trigger while passing through those conditions?
" Your automation will only trigger when your battery state goes from below 98 to above 98 % SOC and then the actions will only occur if your input power is above 3000 W."
How about making the automation check continuously for criteria, can i do that? I am looking at this wrong?
That is not required and you have linked to an unrelated post.
Yes you can, like this:
alias: Solar Divert Immersion
description: ""
trigger:
- platform: state
entity_id: sensor.battery_state_of_capacity
to: # a null "to" triggers on all state changes of this entity.
condition:
- condition: numeric_state
entity_id: sensor.battery_state_of_capacity
above: 98
- condition: numeric_state
entity_id: sensor.inverter_input_power
above: 3000
action:
- service: switch.turn_on
target:
entity_id: switch.sonoff_100168ab4d
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: switch.turn_off
target:
entity_id: switch.sonoff_100168ab4d
mode: restart
One more word of advice. Edit your switch entity_id to change it to something descriptive (e.g. switch.location_function) before you start using it in automations and dashboards.