Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ------------------------------------------------------------------
- # This is an example configuration, please modify it
- # ------------------------------------------------------------------
- ---
- 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
- # Set to auto-match with a GivEnergy serial number, but you can override the serial or the sensor names
- # if it doesn't work or if you have more than one inverter you will need to list both
- geserial: 're:sensor.givtcp_(.+)_soc_kwh'
- # geserial2: 're:sensor.givtcp2_(.+)_soc_kwh'
- #
- # Sensors, currently more than one can be specified and they will be summed up automatically
- # however if you have two inverters only set one of them as they will both read the same.
- #
- load_today:
- - sensor.givtcp_{geserial}_load_energy_today_kwh
- import_today:
- - sensor.givtcp_{geserial}_import_energy_today_kwh
- export_today:
- - sensor.givtcp_{geserial}_export_energy_today_kwh
- #
- # If you enable ge_cloud_data then the load/import and export data will be fetches from the GE cloud instead of from GivTCP sensors
- # this is usually less efficent and of course prone to internet downtime, but could be useful if you lost your GivTCP data
- # Set the serial to the inverter serial to pull the data from and the key to your API key
- # When this is set load_today, import_today and export_today are not used
- #
- ge_cloud_data: False
- ge_cloud_serial: '{geserial}'
- ge_cloud_key: 'xxxx'
- #
- # Controls/status - must by 1 per inverter
- #
- num_inverters: 1
- #
- # When set use the REST API rather than HA entity for control, should be more reliable/faster to control
- # Set one per inverter
- givtcp_rest:
- - 'http://homeassistant.local:6345'
- # - 'http://homeassistant.local:6346'
- # If not using REST then instead set the Control here (one for each inverter)
- # - you can delete this section if using REST
- charge_rate:
- - number.givtcp_{geserial}_battery_charge_rate
- # - number.givtcp2_{geserial2}_battery_charge_rate
- discharge_rate:
- - number.givtcp_{geserial}_battery_discharge_rate
- # - number.givtcp2_{geserial2}_battery_discharge_rate
- soc_kw:
- - sensor.givtcp_{geserial}_soc_kwh
- # - sensor.givtcp2_{geserial2}_soc_kwh
- soc_max:
- - sensor.givtcp_{geserial}_battery_capacity_kwh
- # - sensor.givtcp2_{geserial2}_battery_capacity_kwh
- reserve:
- - number.givtcp_{geserial}_battery_power_reserve
- # - number.givtcp2_{geserial2}_battery_power_reserve
- inverter_mode:
- - select.givtcp_{geserial}_mode
- # - select.givtcp2_{geserial2}_mode
- charge_start_time:
- - select.givtcp_{geserial}_charge_start_time_slot_1
- # - select.givtcp2_{geserial2}_charge_start_time_slot_1
- charge_end_time:
- - select.givtcp_{geserial}_charge_end_time_slot_1
- # - select.givtcp2_{geserial2}_charge_end_time_slot_1
- charge_limit:
- - number.givtcp_{geserial}_target_soc
- # - number.givtcp2_{geserial2}_target_soc
- scheduled_charge_enable:
- - switch.givtcp_{geserial}_enable_charge_schedule
- # - switch.givtcp2_{geserial2}_enable_charge_schedule
- scheduled_discharge_enable:
- - switch.givtcp_{geserial}_enable_discharge_schedule
- # - switch.givtcp2_{geserial2}_enable_discharge_schedule
- discharge_start_time:
- - select.givtcp_{geserial}_discharge_start_time_slot_1
- # - select.givtcp2_{geserial2}_discharge_start_time_slot_1
- discharge_end_time:
- - select.givtcp_{geserial}_discharge_end_time_slot_1
- # - select.givtcp2_{geserial2}_discharge_end_time_slot_1
- # Inverter max AC limit (one per inverter). E.g for a 3.6kw inverter set to 3600
- # If you have a second inverter for PV only please add the two values together
- inverter_limit:
- - 3600
- # - 7500
- # Inverter clock skew in minutes, e.g. 1 means it's 1 minute fast and -1 is 1 minute slow
- # Seperate start and end options are applied to the start and end time windows, mostly as you want to start late (not early) and finish early (not late)
- # Seperate discharge skew for discharge windows only
- inverter_clock_skew_start: 0
- inverter_clock_skew_end: 0
- inverter_clock_skew_discharge_start: 0
- inverter_clock_skew_discharge_end: 0
- # Set these to match solcast sensor names
- # The regular expression (re:) makes the solcast bit optional
- # If these don't match find your own names in Home Assistant
- pv_forecast_today: re:(sensor.(solcast_|)forecast_today)
- pv_forecast_tomorrow: re:(sensor.(solcast_|)forecast_tomorrow)
- pv_forecast_d3: re:(sensor.(solcast_|)forecast_d3)
- pv_forecast_d4: re:(sensor.(solcast_|)forecast_d4)
- # car_charging_energy defines an incrementing sensor which measures the charge added to your car
- # is used for car_charging_hold feature to filter out car charging from the previous load data
- # Automatically set to detect Wallbox and Zappi, if it doesn't match manually enter your sensor name
- # Also adjust car_charging_energy_scale if it's not in kwH to fix the units
- car_charging_energy: 're:(sensor.myenergi_zappi_[0-9a-z]+_charge_added_session|sensor.wallbox_portal_added_energy)'
- # car_charging_planned is set to a sensor which when positive indicates the car will charged in the upcoming low rate slots
- # This should not be needed if you use Octopus Intelligent Slots which will take priority if enabled
- # The list of possible values is in car_charging_planned_response
- # Auto matches Zappi and Wallbox, or change it for your own
- car_charging_planned: 're:(sensor.wallbox_portal_status_description|sensor.myenergi_zappi_[0-9a-z]+_plug_status)'
- car_charging_planned_response:
- - 'yes'
- - 'on'
- - 'true'
- - 'connected'
- - 'ev connected'
- - 'charging'
- - 'paused'
- - 'waiting for car demand'
- - 'waiting for ev'
- - 'scheduled'
- - 'enabled'
- - 'latched'
- - 'locked'
- - 'plugged in'
- # To make planned car charging more accurate, either using car_charging_planned or Octopus Inteligent
- # specify your battery size in kwh, charge limit % and current car battery soc % sensors/values
- # If you have intelligent you don't need to use this as it allocate slots, but it may help to get a more accurate figure
- # car_charging_battery_size: 75
- # car_charging_limit: 're:number.tsunami_charge_limit'
- # car_charging_soc: 're:sensor.tsunami_battery'
- # If you have Octopus intelligent, enable the intelligent slot information to add to pricing
- # Will automatically disable if not found, or comment out to disable fully
- # When enabled it overrides the 'car_charging_planned' feature and predict the car charging based on the intelligent plan (unless octopus intelligent charging is False)
- octopus_intelligent_slot: 're:binary_sensor.octopus_intelligent_slot'
- # Energy rates
- # Please set one of these three, if multiple are set then Octopus is used first, second rates_import/rates_export and latestly basic metric
- # Set import and export entity to point to the Octopus Energy plugin
- # automatically matches your meter number assuming you have only one (no need to edit the below)
- # Will be ignored if you don't have the sensor
- # Or manually set it to the correct sensor names if the automatic match doesn't work 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)'
- # 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 metric_house from above
- rates_import:
- - start: "23:30:00"
- end: "05:30:00"
- rate: 7.5
- - start: "05:30:00"
- end: "23:30:00"
- rate: 40.13
- #
- #rates_export:
- # - rate: 4.2
- # Can be used instead of the plugin to get import rates directly online
- # Overrides metric_octopus_import and rates_import
- # 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-FLEX-BB-23-02-08/electricity-tariffs/E-1R-AGILE-FLEX-BB-23-02-08-A/standard-unit-rates"
- # Overrides metric_octopus_export and rates_export
- # rates_export_octopus_url: "https://api.octopus.energy/v1/products/FLUX-EXPORT-BB-23-02-14/electricity-tariffs/E-1R-FLUX-EXPORT-BB-23-02-14-A/standard-unit-rates"
- # rates_export_octopus_url: "https://api.octopus.energy/v1/products/AGILE-OUTGOING-BB-23-02-28/electricity-tariffs/E-1R-AGILE-OUTGOING-BB-23-02-28-A/standard-unit-rates/"
- # rates_export_octopus_url: "https://api.octopus.energy/v1/products/OUTGOING-FIX-12M-BB-23-02-09/electricity-tariffs/E-1R-OUTGOING-FIX-12M-BB-23-02-09-A/standard-unit-rates/"
- # Or set rates to be assumed for imports for the house, charging the battery and exports
- # this method will not allow automatic setting of charging windows
- # metric_house: 38
- # metric_battery: 7.5
- # metric_export: 4.2
- # 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
- - 14
- # 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
- # Include one value for each days_previous value
- days_previous_weight:
- - 1
- - 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
- # Maximum number of charge and discharge windows
- # Larger numbers of windows can increase runtime, normally 128 is more than enough for most uses
- max_windows: 128
- # Specify the devices that notifies are sent to, the default is 'notify' which goes to all
- #notify_devices:
- # - mobile_app_treforsiphone12_2
- # Set the frequency in minutes that this plugin is run
- # recommend something that divides by 60 (5, 10 or 15) or you won't trigger at the start of energy price slots
- run_every: 5
- # 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_<name>' 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
Add Comment
Please, Sign In to add comment