blueprint: name: "Auto: Inverter, limit battery charge to 90%" description: When battery state of charge reaches 90%, it will prevent further charging of the battery 6 days a week. On 7th day it will charge to 100 for calibration. domain: automation input: battery_chargelevel: name: Home Battery Capacity description: This sensor checks the current battery charge level (State of Charge in %) selector: entity: domain: sensor max_batt_charge_current: name: Maximum Battery Charge Current description: Choose the entity that regulates the maximum battery charge current (amperes) selector: entity: domain: number charge_current_max: name: Maximum Charge Current description: "Chose a MAXIMUM value (Ampere) that your batteries may charge with. CAUTION: This value should NOT exceed 0.5C." trigger: - platform: numeric_state entity_id: !input battery_chargelevel above: 89 - platform: numeric_state entity_id: !input battery_chargelevel below: 88 action: - if: - condition: numeric_state entity_id: !input battery_chargelevel above: 89 - condition: time weekday: - mon - tue - wed - thu - fri - sun then: - service: number.set_value data: value: "0" target: entity_id: !input max_batt_charge_current else: - service: number.set_value data: value: !input charge_current_max target: entity_id: !input max_batt_charge_current mode: single