You can set the shelly total Power Entity Id and Aps Invert number Maxout Power Entity ID,to control zero feed.
blueprint:
name: Smart Strategy
description: zero feed for space
domain: automation
input:
shelly_total_active_power:
name: shelly total active power
selector:
entity:
filter:
- device_class: power
domain: sensor
invert_max_output_power:
name: invert max output power
selector:
entity:
filter:
- domain: number
variables:
_shelly_power: !input shelly_total_active_power
_invert_output_power: !input invert_max_output_power
triggers:
- trigger: state
entity_id: !input shelly_total_active_power
conditions:
- condition: template
value_template: >
{% set modifyPower = states(_invert_output_power) | int + states(_shelly_power) | int %}
{%if modifyPower < 30 %}
{% set modifyPower = 30 %}
{% elif modifyPower > 800 %}
{% set modifyPower = 800 %}
{% endif %}
{{modifyPower |int != states(_invert_output_power) | int }}
actions:
- action: number.set_value
target:
entity_id: number.solar_max_output
data:
value: >
{% set modifyPower = states(_invert_output_power) | int + states(_shelly_power) | int %}
{%if modifyPower < 30 %}
{% set modifyPower = 30 %}
{% elif modifyPower > 800 %}
{% set modifyPower = 800 %}
{% endif %}
{{modifyPower}}