alias: Predbat Charge / Discharge Control description: "" trigger: - platform: state entity_id: - binary_sensor.predbat_charging to: "on" id: predbat_charge_on - platform: state entity_id: - binary_sensor.predbat_charging to: "off" id: predbat_charge_off - platform: state entity_id: - binary_sensor.predbat_discharging to: "on" id: predbat_discharge_on - platform: state entity_id: - binary_sensor.predbat_discharging to: "off" id: predbat_discharge_off condition: [] action: - choose: - conditions: - condition: trigger id: - predbat_charge_on sequence: - service: select.select_option target: entity_id: select.ss_prog1_charge data: option: "Allow Grid" - conditions: - condition: trigger id: - predbat_charge_off sequence: - service: select.select_option target: entity_id: select.ss_prog1_charge data: option: "No Grid or Gen" - conditions: - condition: trigger id: - predbat_discharge_on sequence: - service: switch.turn_on metadata: {} data: {} target: entity_id: switch.ss_solar_export - conditions: - condition: trigger id: - predbat_discharge_off sequence: - service: switch.turn_off target: entity_id: - switch.ss_solar_export data: {} mode: single alias: PredBat - Copy Charge Limit description: Copy Battery SOC to all time slots trigger: - platform: state entity_id: - number.ss_prog1_capacity to: null condition: [] action: - service: number.set_value data_template: entity_id: - number.ss_prog2_capacity - number.ss_prog3_capacity - number.ss_prog4_capacity - number.ss_prog5_capacity - number.ss_prog6_capacity value: "{{ states('number.ss_prog1_capacity')|int(20) }}" mode: single