Solaredge Modbus Configuration for Single Inverter and Battery

Thank you.

Please could you show the next bit - what comes after

entity_id: number.solaredge_i1_storage_discharge_limit

ie what are the variables?

Also some of the entities in my pre-installed YAMLs are of the form d17eca2b9c67371873384b590b0b17f1
rather than number.solaredge_i1_storage_discharge_limit

How are these translated?

That looks more like a device_id than an entity_id

number.solaredge_i1_storage_discharge_limit is an entity_id.

Here’s the complete automation. Bear in mind that I’ve created some input_boolean and some input_number helpers as well as a timer to limit the overall charge period to 4 hours at any single charge window . I’ve also created an option to cope with the daily inverter reset that can happen during a charge window.

alias: Rolec EV Chargepoint schedule
description: Multiple Slots for Agile
trigger:
  - platform: state
    entity_id:
      - >-
        binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
    from: "off"
    to: "on"
    id: "On"
    enabled: true
  - platform: state
    entity_id:
      - >-
        binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
    from: "on"
    to: "off"
    id: "Off"
    enabled: true
  - platform: state
    entity_id:
      - switch.shelly1_c45bbe7867c7
    from: unavailable
    id: Rolec Available
  - alias: Rolec 4 Hour charge completed
    platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.rolec_4_hour_charge_period
    id: Stop Charge
  - platform: time
    at: "20:59:00"
    id: Activate Charge Session
  - alias: When inverter resets
    platform: state
    entity_id:
      - switch.solaredge_i1_advanced_power_control
    from: unavailable
    to: "on"
    id: Inverter Reset
    for:
      hours: 0
      minutes: 1
      seconds: 0
  - platform: numeric_state
    entity_id:
      - sensor.shellyem_244cab4194b1_channel_2_power
    below: 20
    id: Charge Complete
  - platform: state
    entity_id:
      - binary_sensor.morning
    to: "on"
    id: Reset Timer
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Activate Charge Session
        sequence:
          - condition: state
            entity_id: input_boolean.rolec_battery_master
            state: "off"
          - condition: state
            entity_id: input_boolean.car_plugged_in
            state: "on"
          - data: {}
            target:
              entity_id: input_boolean.rolec_battery_master
            action: input_boolean.turn_on
      - conditions:
          - condition: trigger
            id:
              - "On"
          - condition: state
            entity_id: input_boolean.rolec_battery_master
            state: "on"
          - condition: state
            entity_id: input_boolean.car_plugged_in
            state: "on"
        sequence:
          - data: {}
            target:
              entity_id: switch.shelly1_c45bbe7867c7
            action: switch.turn_on
          - delay:
              hours: 0
              minutes: 0
              seconds: 30
              milliseconds: 0
          - data:
              value: >-
                {{
                states('input_number.desired_battery_output_limit_for_overnight_ev_charging')
                | float(0) }}
            target:
              entity_id: number.solaredge_i1_storage_discharge_limit
            action: number.set_value
          - data: {}
            target:
              entity_id: timer.rolec_4_hour_charge_period
            action: timer.start
      - conditions:
          - condition: trigger
            id:
              - "Off"
        sequence:
          - data: {}
            target:
              entity_id: switch.shelly1_c45bbe7867c7
            action: switch.turn_off
          - delay:
              hours: 0
              minutes: 0
              seconds: 30
              milliseconds: 0
          - data:
              value: >-
                {{ states('input_number.default_battery_output_limit') |
                float(0) }}
            target:
              entity_id: number.solaredge_i1_storage_discharge_limit
            action: number.set_value
          - data: {}
            target:
              entity_id: timer.rolec_4_hour_charge_period
            action: timer.pause
      - conditions:
          - condition: trigger
            id: Rolec Available
          - condition: state
            entity_id: >-
              binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
            state: "on"
          - condition: state
            entity_id: switch.shelly1_c45bbe7867c7
            state: "off"
          - condition: state
            entity_id: input_boolean.rolec_battery_master
            state: "on"
          - condition: state
            entity_id: input_boolean.car_plugged_in
            state: "on"
        sequence:
          - data: {}
            target:
              entity_id: switch.shelly1_c45bbe7867c7
            action: switch.turn_on
          - data:
              message: >-
                The Rolec was turned on because it became available during a
                charge period.
              title: ROLEC ON
            action: script.text_notify_dave
          - delay:
              hours: 0
              minutes: 0
              seconds: 30
              milliseconds: 0
          - data:
              value: >-
                {{
                states('input_number.desired_battery_output_limit_for_overnight_ev_charging')
                | float(0) }}
            target:
              entity_id: number.solaredge_i1_storage_discharge_limit
            action: number.set_value
      - conditions:
          - condition: trigger
            id: Rolec Available
          - condition: state
            entity_id: >-
              binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
            state: "off"
          - condition: state
            entity_id: switch.shelly1_c45bbe7867c7
            state: "on"
        sequence:
          - data: {}
            target:
              entity_id: switch.shelly1_c45bbe7867c7
            action: switch.turn_off
          - data:
              message: >-
                The Rolec was turned off because it was on outside of a charge
                period.
              title: ROLEC OFF
            action: script.text_notify_dave
      - conditions:
          - condition: trigger
            id:
              - Stop Charge
              - Charge Complete
        sequence:
          - data: {}
            target:
              entity_id: switch.shelly1_c45bbe7867c7
            action: switch.turn_off
          - delay:
              hours: 0
              minutes: 0
              seconds: 30
              milliseconds: 0
          - data:
              value: >-
                {{ states('input_number.default_battery_output_limit') |
                float(0) }}
            target:
              entity_id: number.solaredge_i1_storage_discharge_limit
            action: number.set_value
          - action: script.car_plugged_in
            data: {}
      - conditions:
          - condition: trigger
            id:
              - Inverter Reset
          - condition: numeric_state
            entity_id: number.solaredge_i1_storage_discharge_limit
            above: 100
          - condition: state
            entity_id: switch.shelly1_c45bbe7867c7
            state: "on"
          - condition: state
            entity_id: timer.rolec_4_hour_charge_period
            state: active
          - condition: state
            entity_id: input_boolean.car_plugged_in
            state: "on"
        sequence:
          - data:
              value: >-
                {{
                states('input_number.desired_battery_output_limit_for_overnight_ev_charging')
                | float(0) }}
            target:
              entity_id: number.solaredge_i1_storage_discharge_limit
            action: number.set_value
      - conditions:
          - condition: trigger
            id:
              - Reset Timer
        sequence:
          - wait_for_trigger:
              - platform: state
                entity_id:
                  - switch.shelly1_c45bbe7867c7
                from: "on"
                to: "off"
                for:
                  hours: 0
                  minutes: 1
                  seconds: 0
            timeout:
              hours: 1
              minutes: 0
              seconds: 0
              milliseconds: 0
          - target:
              entity_id: timer.rolec_4_hour_charge_period
            data: {}
            action: timer.cancel
mode: single

i am loving all these integrations so easy to get going

I have an automation working for mine where it tweaks the active power limit based on export cost, current home consumption and battery level

ONe issue i have is on the tesla style power dashboard my sensors for battery’s from the template build are not doing anything

battery_to_house_entity: sensor.solar_battery_to_house_w
grid_to_battery_entity: sensor.solar_grid_to_battery_w
battery_extra_entity: sensor.solaredge_battery1_state_of_charge

the data is all but 0 watts. I.e sensor.solar_battery_to_house_w is 0 now even tho i can see in the solar app its pushing 0.5 kw to my house

Has anybody had their TCP connection suddenly refused? I had all working nicely and now I’m getting an error saying TCP connection refused. Perhaps solar edge disabled it remotely?

I’ve not seen that in 2 years of using this custom component.

Have you set a fixed IP address for your inverter?

Perhaps the IP address has changed?

Thanks. Yes it’s fixed on unfi. And hardwired.

So I called solar edge. And it turns out TCP was disabled on the inverter so it was enabled by solar edge and I had the integration working nicely. Not sure what has disabled it but it’s working again now after they re-enabled it.

Is there a full list anywhere of the SolarEdge commands done from HA with their syntax, arguments etc?

Yes, it’s all in the documentation for the custom component.