pred_bat: module: predbat class: PredBat # Sets the prefix for all created entities in HA - only change if you want to run more than once instance prefix: predbat # Timezone to work in timezone: Europe/London # XXX: Template configuration, delete this line once you have set up for your system template: True # If you are using Predbat outside of HA then set the HA URL and Key (long lived access token here) #ha_url: 'http://homeassistant.local:8123' #ha_key: 'xxx' # Currency, symbol for main currency second symbol for 1/100s e.g. $ c or £ p or e c currency_symbols: - '£' - 'p' # Number of threads to use in plan calculation # Can be auto for automatic, 0 for off or values 1-N for a fixed number threads: auto # Solax Inverter Configuration solax_modbus_new: true num_inverters: 1 inverter_type: SOLAX inverter: name: "Solax Gen4+ (Modbus Power Control)" has_rest_api: False has_mqtt_api: False has_service_api: True output_charge_control: "power" charge_control_immediate: True has_charge_enable_time: False has_discharge_enable_time: False has_target_soc: False has_reserve_soc: True has_timed_pause: False charge_time_format: "S" charge_time_entity_is_option: False soc_units: "%" num_load_entities: 1 has_ge_inverter_mode: False time_button_press: True clock_time_format: "%Y-%m-%d %H:%M:%S" write_and_poll_sleep: 4 has_time_window: False support_charge_freeze: True support_discharge_freeze: True has_idle_time: False can_span_midnight: True charge_discharge_with_rate: True target_soc_used_for_discharge: False # Set to the maximum rate your inverter can charge your battery at (in Watts) battery_rate_max: - 6000 # Set your battery capacity in kWh soc_max: - 10.2 # Inverter max AC limit (one per inverter) # If you have a second inverter for PV only please add the two values together inverter_limit: - 6000 # Export limit is a software limit set on your inverter that prevents exporting above a given level # When enabled Predbat will model this limit # export_limit: # - 3680 load_today: - sensor.todays_house_load import_today: - re:(sensor.solax([a-z_]+|)_today_s_import_energy) export_today: - re:(sensor.solax([a-z_]+|)_today_s_export_energy) pv_today: - re:(sensor.solax([a-z_]+|)_today_s_solar_energy) inverter_time: - re:(sensor.solax([a-z_]+|)_rtc) pv_power: - re:(sensor.solax([a-z_]+|)_pv_power_total) grid_power: - re:(sensor.solax([a-z_]+|)_measured_power) grid_power_invert: - false load_power: - re:(sensor.solax([a-z_]+|)_house_load) # Set the reserve entity based upon which work mode the inverter is set to: reserve: # for inverter work mode "Self Use Mode", set reserve to selfuse_discharge_min_soc - re:(number.solax([a-z_]+|)_selfuse_discharge_min_soc) # for inverter work mode "Backup Mode", set reserve to backup_discharge_min_soc # - re:(number.solax([a-z_]+|)_backup_discharge_min_soc) # battery_min_soc is not needed #battery_min_soc: # - re:(number.solax([a-z_]+|)_selfuse_discharge_min_soc) # The Gen 5 inverters can have two batteries, with entity names 'battery_1_xxx' and 'battery_2_xxx' # If you have a Gen 4 inverter with a single battery, the regular expressions should match the single battery entity names (without '_1') soc_percent: - re:(sensor.solax([a-z_]+|)(?=v0.6.1 #octopus_intelligent_slot: 'binary_sensor.ohme_slot_active' #octopus_ready_time: 'time.ohme_target_time' #octopus_charge_limit: 'number.ohme_target_percent' # Set this to False if you use Octopus Intelligent slot for car planning but when on another tariff e.g. Agile #octopus_slot_low_rate: False # Carbon Intensity data from National grid carbon_intensity: 're:(sensor.carbon_intensity_uk)' # Octopus saving session points to the saving session Sensor in the Octopus plugin, when enabled saving sessions will be at the assumed # Rate is read automatically from the add-in and converted to pence using the conversion rate below (default is 8) octopus_saving_session: 're:(binary_sensor.octopus_energy([0-9a-z_]+|)_saving_session(s|))' octopus_saving_session_octopoints_per_penny: 8 # Octopus free session points to the free session Sensor in the Octopus plugin # Note: You must enable this event sensor in the Octopus Integration in Home Assistant for it to work octopus_free_session: 're:(event.octopus_energy_([0-9a-z_]+|)_octoplus_free_electricity_session_events)' # Energy rates # Please set one of these three, if multiple are set then Octopus is used first, second rates_import/rates_export and latest basic metric # Set import and export entity to point to the Octopus Energy plugin # automatically matches your meter number assuming you have only one # Will be ignored if you don't have the sensor # Or manually set it to the correct sensor names e.g: # sensor.octopus_energy_electricity_xxxxxxxxxx_xxxxxxxxxxxxx_current_rate # sensor.octopus_energy_electricity_xxxxxxxxxx_xxxxxxxxxxxxx_export_current_rate metric_octopus_import: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_current_rate)' metric_octopus_export: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_export_current_rate)' # Standing charge can be set to a sensor (e.g. Octopus) or manually entered in pounds here (e.g. 0.50 is 50p) metric_standing_charge: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_current_standing_charge)' # Or set your actual rates across time for import and export # If start/end is missing it's assumed to be a fixed rate # Gaps are filled with 0 # rates_import: # - start: "23:30:00" # end: "05:30:00" # rate: 7.5 # - start: "05:30:00" # end: "23:30:00" # rate: 30.0 # rates_export: # - rate: 15.0 # Can be used instead of the plugin to get import rates directly online # Overrides metric_octopus_import and rates_import # See the 'energy rates' part of the documentation for instructions on how to find the correct URL for your tariff and DNO region # # rates_import_octopus_url : "https://api.octopus.energy/v1/products/FLUX-IMPORT-23-02-14/electricity-tariffs/E-1R-FLUX-IMPORT-23-02-14-A/standard-unit-rates" # rates_import_octopus_url : "https://api.octopus.energy/v1/products/AGILE-24-10-01/electricity-tariffs/E-1R-AGILE-24-10-01-A/standard-unit-rates" # Overrides metric_octopus_export and rates_export # rates_export_octopus_url: "https://api.octopus.energy/v1/products/FLUX-EXPORT-23-02-14/electricity-tariffs/E-1R-FLUX-EXPORT-23-02-14-A/standard-unit-rates" # rates_export_octopus_url: "https://api.octopus.energy/v1/products/AGILE-OUTGOING-19-05-13/electricity-tariffs/E-1R-AGILE-OUTGOING-19-05-13-A/standard-unit-rates/" # Import rates can be overridden with rate_import_override # Export rates can be overridden with rate_export_override # Use the same format as above, but a date can be included if it just applies for a set day (e.g. Octopus power ups) # This will override even the Octopus plugin rates if enabled # #rates_import_override: # - date: '2023-09-10' # start: '14:00:00' # end: '14:30:00' # rate: 5 # For pv estimate, leave blank for central estimate, or add 10 for 10% curve (worst case) or 90 or 90% curve (best case) # If you use 10 then disable pv_metric10_weight below # pv_estimate: 10 # Days previous is the number of days back to find historical load data # Recommended is 7 to capture day of the week but 1 can also be used # if you have more history you could use 7 and 14 (in a list) but the standard data in HA only lasts 10 days days_previous: - 7 # Days previous weight can be used to control the weighting of the previous load points, the values are multiplied by their # weights and then divided through by the total weight. E.g. if you used 1 and 0.5 then the first value would have 2/3rd of the weight and the second 1/3rd days_previous_weight: - 1 # Number of hours forward to forecast, best left as-is unless you have specific reason forecast_hours: 48 # The number of hours ahead to count in charge planning (for cost estimates) # It's best to set this on your charge window repeat cycle (24) but you may want to set it higher for more variable # tariffs like Agile forecast_plan_hours: 24 # Specify the devices that notifies are sent to, the default is 'notify' which goes to all #notify_devices: # - mobile_app_treforsiphone12_2 # Battery scaling makes the battery smaller (e.g. 0.9) or bigger than its reported # If you have an 80% DoD battery that falsely reports it's kwh then set it to 0.8 to report the real figures battery_scaling: 1.0 # Can be used to scale import and export data, used for workarounds import_export_scaling: 1.0 # Export triggers: # For each trigger give a name, the minutes of export needed and the energy required in that time # Multiple triggers can be set at once so in total you could use too much energy if all run # Creates an entity called 'binary_sensor.predbat_export_trigger_' which will be turned On when the condition is valid # connect this to your automation to start whatever you want to trigger export_triggers: - name: 'large' minutes: 60 energy: 1.0 - name: 'small' minutes: 15 energy: 0.25 # Nordpool market energy rates #futurerate_url: 'https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=DATE&market=N2EX_DayAhead&deliveryArea=UK¤cy=GBP' #futurerate_adjust_import: False #futurerate_adjust_export: False #futurerate_peak_start: "16:00:00" #futurerate_peak_end: "19:00:00" #futurerate_peak_premium_import: 14 #futurerate_peak_premium_export: 6.5 # If you have a sensor that gives the energy consumed by your solar diverter then add it here # this will make the predictions more accurate. It should be an incrementing sensor, it can reset at midnight or not # It's assumed to be in Kwh but scaling can be applied if need be #iboost_energy_today: 'sensor.xxxxx' #iboost_energy_scaling: 1.0