131 lines
8.7 KiB
JSON
131 lines
8.7 KiB
JSON
[
|
|
{
|
|
"id": "EMHASS Sigenergy Battery Management",
|
|
"automation": "- alias: EMHASS Sigenergy Battery Management\n description: Automatically control the Sigenergy battery system using the EMHASS\n energy plan\n triggers:\n - trigger: state\n entity_id:\n - sensor.mpc_batt_power\n - sensor.mpc_grid_power\n from: null\n to: null\n actions:\n - delay:\n hours: 0\n minutes: 0\n seconds: 1\n milliseconds: 0\n - variables:\n p_batt: '{{ states(''sensor.mpc_batt_power'') | int(0) }}'\n p_batt_kw: '{{ (p_batt / 1000) | round(3) }}'\n p_grid: '{{ states(''sensor.mpc_grid_power'') | int(0) }}'\n max_charge_rate: '{{ states(''sensor.sigen_plant_ess_rated_charging_power'')\n | float(0) }}'\n max_discharge_rate: '{{ states(''sensor.sigen_plant_ess_rated_discharging_power'')\n | float(0) }}'\n max_import_rate_kw: 100\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ p_grid == 0 }}'\n sequence:\n - action: select.select_option\n metadata: {}\n data:\n option: Maximum Self Consumption\n target:\n entity_id: select.sigen_plant_remote_ems_control_mode\n alias: Maximum Self Consumption\n - action: number.set_value\n metadata: {}\n data:\n value: '{{ max_charge_rate }}'\n target:\n entity_id:\n - number.sigen_plant_ess_max_charging_limit\n - action: number.set_value\n metadata: {}\n data:\n value: '{{ max_discharge_rate }}'\n target:\n entity_id:\n - number.sigen_plant_ess_max_discharging_limit\n alias: Check self consume conditions\n - conditions:\n - condition: template\n value_template: '{{ p_batt > 0 or (p_grid < 0 and p_batt == 0) }}'\n sequence:\n - action: select.select_option\n metadata: {}\n data:\n option: Command Discharging (PV First)\n target:\n entity_id: select.sigen_plant_remote_ems_control_mode\n - action: number.set_value\n metadata: {}\n data:\n value: '{{ p_batt_kw }}'\n target:\n entity_id: number.sigen_plant_ess_max_discharging_limit\n alias: Check discharge conditions\n - conditions:\n - condition: template\n value_template: '{{ p_batt < 0 }}'\n sequence:\n - action: select.select_option\n metadata: {}\n data:\n option: Command Charging (PV First)\n target:\n entity_id: select.sigen_plant_remote_ems_control_mode\n - action: number.set_value\n metadata: {}\n data:\n value: '{{ p_batt_kw | abs }}'\n target:\n entity_id:\n - number.sigen_plant_ess_max_charging_limit\n - action: number.set_value\n metadata: {}\n data:\n value: '{{ max_import_rate_kw if p_grid > 0 else 0 }}'\n target:\n entity_id:\n - number.sigen_plant_pcs_import_limitation\n alias: Check charge conditions\n - conditions:\n - condition: template\n value_template: '{{ p_batt == 0 }}'\n sequence:\n - action: select.select_option\n metadata: {}\n data:\n option: Standby\n target:\n entity_id: select.sigen_plant_remote_ems_control_mode\n - action: number.set_value\n metadata: {}\n data:\n value: 0\n target:\n entity_id:\n - number.sigen_plant_pcs_import_limitation\n alias: Check standby conditions\n mode: single",
|
|
"config": [
|
|
{
|
|
"name": "MPC battery power",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.mpc_batt_power",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "MPC grid power",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.mpc_grid_power",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Sigenergy plant ESS rated charging power",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.sigen_plant_ess_rated_charging_power",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Sigenergy plant ESS rated discharging power",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.sigen_plant_ess_rated_discharging_power",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Sigenergy plant remote EMS control mode",
|
|
"room": null,
|
|
"type": "select",
|
|
"id": {
|
|
"entity_id": "select.sigen_plant_remote_ems_control_mode",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Sigenergy plant ESS max charging limit",
|
|
"room": null,
|
|
"type": "number",
|
|
"id": {
|
|
"entity_id": "number.sigen_plant_ess_max_charging_limit",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Sigenergy plant ESS max discharging limit",
|
|
"room": null,
|
|
"type": "number",
|
|
"id": {
|
|
"entity_id": "number.sigen_plant_ess_max_discharging_limit",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Sigenergy plant PCS import limitation",
|
|
"room": null,
|
|
"type": "number",
|
|
"id": {
|
|
"entity_id": "number.sigen_plant_pcs_import_limitation",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "Sigenergy Inverter Curtailment",
|
|
"automation": "- alias: Sigenergy Inverter Curtailment\n description: Automatically manage negative energy prices by curtailing exporting\n and solar generation\n variables:\n max_export_kw: 30\n max_pv_kw: 100\n triggers:\n - trigger: numeric_state\n entity_id:\n - sensor.home_feed_in_price\n below: 0\n id: negative_fit\n - trigger: numeric_state\n entity_id:\n - sensor.home_feed_in_price\n id: positive_fit\n above: 0\n - trigger: numeric_state\n entity_id:\n - sensor.home_general_price\n above: 0\n id: positive_price\n - trigger: numeric_state\n entity_id:\n - sensor.home_general_price\n below: 0\n id: negative_price\n - trigger: state\n entity_id:\n - sensor.sigen_plant_grid_connection_status\n from: null\n to: null\n id: grid_connection_change\n actions:\n - alias: Curtail if feedin price is negative\n if:\n - condition: numeric_state\n entity_id: sensor.home_feed_in_price\n below: 0\n then:\n - action: number.set_value\n metadata: {}\n data:\n value: 0\n target:\n entity_id: number.sigen_plant_grid_export_limitation\n alias: Set export limit to 0\n else:\n - action: number.set_value\n metadata: {}\n data:\n value: '{{ max_export_kw }}'\n target:\n entity_id: number.sigen_plant_grid_export_limitation\n alias: Set export limit to 30\n - alias: Ignore PV if usage price is negative\n if:\n - condition: numeric_state\n entity_id: sensor.home_general_price\n below: 0\n - condition: state\n entity_id: sensor.sigen_plant_grid_connection_status\n state: On Grid\n then:\n - action: number.set_value\n metadata: {}\n data:\n value: 0\n target:\n entity_id: number.sigen_plant_pv_max_power_limit\n alias: Set PV limit to 0\n else:\n - action: number.set_value\n metadata: {}\n data:\n value: '{{ max_pv_kw }}'\n target:\n entity_id: number.sigen_plant_pv_max_power_limit\n alias: Set PV limit to Maximum\n mode: single",
|
|
"config": [
|
|
{
|
|
"name": "Home feed in price",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.home_feed_in_price",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Home general price",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.home_general_price",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Sigenergy plant grid connection status",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.sigen_plant_grid_connection_status",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Sigenergy plant grid export limitation",
|
|
"room": null,
|
|
"type": "number",
|
|
"id": {
|
|
"entity_id": "number.sigen_plant_grid_export_limitation",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "Sigenergy plant PV max power limit",
|
|
"room": null,
|
|
"type": "number",
|
|
"id": {
|
|
"entity_id": "number.sigen_plant_pv_max_power_limit",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
}
|
|
] |