Guest User

Predbat Config

a guest
Jul 18th, 2023
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.90 KB | None | 0 0
  1. # ------------------------------------------------------------------
  2. # This is an example configuration, please modify it
  3. # ------------------------------------------------------------------
  4. ---
  5. pred_bat:
  6. module: predbat
  7. class: PredBat
  8.  
  9. # Sets the prefix for all created entities in HA - only change if you want to run more than once instance
  10. prefix: predbat
  11.  
  12. # Timezone to work in
  13. timezone: Europe/London
  14.  
  15. # Set to auto-match with a GivEnergy serial number, but you can override the serial or the sensor names
  16. # if it doesn't work or if you have more than one inverter you will need to list both
  17. geserial: 're:sensor.givtcp_(.+)_soc_kwh'
  18. # geserial2: 're:sensor.givtcp2_(.+)_soc_kwh'
  19.  
  20. #
  21. # Sensors, currently more than one can be specified and they will be summed up automatically
  22. # however if you have two inverters only set one of them as they will both read the same.
  23. #
  24. load_today:
  25. - sensor.givtcp_{geserial}_load_energy_today_kwh
  26. import_today:
  27. - sensor.givtcp_{geserial}_import_energy_today_kwh
  28. export_today:
  29. - sensor.givtcp_{geserial}_export_energy_today_kwh
  30. #
  31. # 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
  32. # this is usually less efficent and of course prone to internet downtime, but could be useful if you lost your GivTCP data
  33. # Set the serial to the inverter serial to pull the data from and the key to your API key
  34. # When this is set load_today, import_today and export_today are not used
  35. #
  36. ge_cloud_data: False
  37. ge_cloud_serial: '{geserial}'
  38. ge_cloud_key: 'xxxx'
  39. #
  40. # Controls/status - must by 1 per inverter
  41. #
  42. num_inverters: 1
  43. #
  44. # When set use the REST API rather than HA entity for control, should be more reliable/faster to control
  45. # Set one per inverter
  46. givtcp_rest:
  47. - 'http://homeassistant.local:6345'
  48. # - 'http://homeassistant.local:6346'
  49.  
  50. # If not using REST then instead set the Control here (one for each inverter)
  51. # - you can delete this section if using REST
  52. charge_rate:
  53. - number.givtcp_{geserial}_battery_charge_rate
  54. # - number.givtcp2_{geserial2}_battery_charge_rate
  55. discharge_rate:
  56. - number.givtcp_{geserial}_battery_discharge_rate
  57. # - number.givtcp2_{geserial2}_battery_discharge_rate
  58. soc_kw:
  59. - sensor.givtcp_{geserial}_soc_kwh
  60. # - sensor.givtcp2_{geserial2}_soc_kwh
  61. soc_max:
  62. - sensor.givtcp_{geserial}_battery_capacity_kwh
  63. # - sensor.givtcp2_{geserial2}_battery_capacity_kwh
  64. reserve:
  65. - number.givtcp_{geserial}_battery_power_reserve
  66. # - number.givtcp2_{geserial2}_battery_power_reserve
  67. inverter_mode:
  68. - select.givtcp_{geserial}_mode
  69. # - select.givtcp2_{geserial2}_mode
  70. charge_start_time:
  71. - select.givtcp_{geserial}_charge_start_time_slot_1
  72. # - select.givtcp2_{geserial2}_charge_start_time_slot_1
  73. charge_end_time:
  74. - select.givtcp_{geserial}_charge_end_time_slot_1
  75. # - select.givtcp2_{geserial2}_charge_end_time_slot_1
  76. charge_limit:
  77. - number.givtcp_{geserial}_target_soc
  78. # - number.givtcp2_{geserial2}_target_soc
  79. scheduled_charge_enable:
  80. - switch.givtcp_{geserial}_enable_charge_schedule
  81. # - switch.givtcp2_{geserial2}_enable_charge_schedule
  82. scheduled_discharge_enable:
  83. - switch.givtcp_{geserial}_enable_discharge_schedule
  84. # - switch.givtcp2_{geserial2}_enable_discharge_schedule
  85. discharge_start_time:
  86. - select.givtcp_{geserial}_discharge_start_time_slot_1
  87. # - select.givtcp2_{geserial2}_discharge_start_time_slot_1
  88. discharge_end_time:
  89. - select.givtcp_{geserial}_discharge_end_time_slot_1
  90. # - select.givtcp2_{geserial2}_discharge_end_time_slot_1
  91.  
  92. # Inverter max AC limit (one per inverter). E.g for a 3.6kw inverter set to 3600
  93. # If you have a second inverter for PV only please add the two values together
  94. inverter_limit:
  95. - 3600
  96. # - 7500
  97.  
  98. # Inverter clock skew in minutes, e.g. 1 means it's 1 minute fast and -1 is 1 minute slow
  99. # 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)
  100. # Seperate discharge skew for discharge windows only
  101. inverter_clock_skew_start: 0
  102. inverter_clock_skew_end: 0
  103. inverter_clock_skew_discharge_start: 0
  104. inverter_clock_skew_discharge_end: 0
  105.  
  106. # Set these to match solcast sensor names
  107. # The regular expression (re:) makes the solcast bit optional
  108. # If these don't match find your own names in Home Assistant
  109. pv_forecast_today: re:(sensor.(solcast_|)forecast_today)
  110. pv_forecast_tomorrow: re:(sensor.(solcast_|)forecast_tomorrow)
  111. pv_forecast_d3: re:(sensor.(solcast_|)forecast_d3)
  112. pv_forecast_d4: re:(sensor.(solcast_|)forecast_d4)
  113.  
  114. # car_charging_energy defines an incrementing sensor which measures the charge added to your car
  115. # is used for car_charging_hold feature to filter out car charging from the previous load data
  116. # Automatically set to detect Wallbox and Zappi, if it doesn't match manually enter your sensor name
  117. # Also adjust car_charging_energy_scale if it's not in kwH to fix the units
  118. car_charging_energy: 're:(sensor.myenergi_zappi_[0-9a-z]+_charge_added_session|sensor.wallbox_portal_added_energy)'
  119.  
  120. # car_charging_planned is set to a sensor which when positive indicates the car will charged in the upcoming low rate slots
  121. # This should not be needed if you use Octopus Intelligent Slots which will take priority if enabled
  122. # The list of possible values is in car_charging_planned_response
  123. # Auto matches Zappi and Wallbox, or change it for your own
  124. car_charging_planned: 're:(sensor.wallbox_portal_status_description|sensor.myenergi_zappi_[0-9a-z]+_plug_status)'
  125. car_charging_planned_response:
  126. - 'yes'
  127. - 'on'
  128. - 'true'
  129. - 'connected'
  130. - 'ev connected'
  131. - 'charging'
  132. - 'paused'
  133. - 'waiting for car demand'
  134. - 'waiting for ev'
  135. - 'scheduled'
  136. - 'enabled'
  137. - 'latched'
  138. - 'locked'
  139. - 'plugged in'
  140.  
  141. # To make planned car charging more accurate, either using car_charging_planned or Octopus Inteligent
  142. # specify your battery size in kwh, charge limit % and current car battery soc % sensors/values
  143. # 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
  144. # car_charging_battery_size: 75
  145. # car_charging_limit: 're:number.tsunami_charge_limit'
  146. # car_charging_soc: 're:sensor.tsunami_battery'
  147.  
  148. # If you have Octopus intelligent, enable the intelligent slot information to add to pricing
  149. # Will automatically disable if not found, or comment out to disable fully
  150. # 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)
  151. octopus_intelligent_slot: 're:binary_sensor.octopus_intelligent_slot'
  152.  
  153. # Energy rates
  154. # Please set one of these three, if multiple are set then Octopus is used first, second rates_import/rates_export and latestly basic metric
  155.  
  156. # Set import and export entity to point to the Octopus Energy plugin
  157. # automatically matches your meter number assuming you have only one (no need to edit the below)
  158. # Will be ignored if you don't have the sensor
  159. # Or manually set it to the correct sensor names if the automatic match doesn't work e.g:
  160. # sensor.octopus_energy_electricity_xxxxxxxxxx_xxxxxxxxxxxxx_current_rate
  161. # sensor.octopus_energy_electricity_xxxxxxxxxx_xxxxxxxxxxxxx_export_current_rate
  162. metric_octopus_import: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_current_rate)'
  163. metric_octopus_export: 're:(sensor.(octopus_energy_|)electricity_[0-9a-z]+_[0-9a-z]+_export_current_rate)'
  164.  
  165. # Or set your actual rates across time for import and export
  166. # If start/end is missing it's assumed to be a fixed rate
  167. # Gaps are filled with metric_house from above
  168. rates_import:
  169. - start: "23:30:00"
  170. end: "05:30:00"
  171. rate: 7.5
  172. - start: "05:30:00"
  173. end: "23:30:00"
  174. rate: 40.13
  175. #
  176. #rates_export:
  177. # - rate: 4.2
  178.  
  179. # Can be used instead of the plugin to get import rates directly online
  180. # Overrides metric_octopus_import and rates_import
  181. # 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"
  182. # 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"
  183.  
  184. # Overrides metric_octopus_export and rates_export
  185. # 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"
  186. # 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/"
  187. # 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/"
  188.  
  189. # Or set rates to be assumed for imports for the house, charging the battery and exports
  190. # this method will not allow automatic setting of charging windows
  191. # metric_house: 38
  192. # metric_battery: 7.5
  193. # metric_export: 4.2
  194.  
  195. # For pv estimate, leave blank for central estimate, or add 10 for 10% curve (worst case) or 90 or 90% curve (best case)
  196. # If you use 10 then disable pv_metric10_weight below
  197. # pv_estimate: 10
  198.  
  199. # Days previous is the number of days back to find historical load data
  200. # Recommended is 7 to capture day of the week but 1 can also be used
  201. # if you have more history you could use 7 and 14 (in a list) but the standard data in HA only lasts 10 days
  202. days_previous:
  203. - 7
  204. - 14
  205.  
  206. # Days previous weight can be used to control the weighting of the previous load points, the values are multiplied by their
  207. # 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
  208. # Include one value for each days_previous value
  209. days_previous_weight:
  210. - 1
  211. - 1
  212.  
  213. # Number of hours forward to forecast, best left as-is unless you have specific reason
  214. forecast_hours: 48
  215.  
  216. # The number of hours ahead to count in charge planning (for cost estimates)
  217. # It's best to set this on your charge window repeat cycle (24) but you may want to set it higher for more variable
  218. # tariffs like Agile
  219. forecast_plan_hours: 24
  220.  
  221. # Maximum number of charge and discharge windows
  222. # Larger numbers of windows can increase runtime, normally 128 is more than enough for most uses
  223. max_windows: 128
  224.  
  225. # Specify the devices that notifies are sent to, the default is 'notify' which goes to all
  226. #notify_devices:
  227. # - mobile_app_treforsiphone12_2
  228.  
  229. # Set the frequency in minutes that this plugin is run
  230. # recommend something that divides by 60 (5, 10 or 15) or you won't trigger at the start of energy price slots
  231. run_every: 5
  232.  
  233. # Battery scaling makes the battery smaller (e.g. 0.9) or bigger than its reported
  234. # If you have an 80% DoD battery that falsely reports it's kwh then set it to 0.8 to report the real figures
  235. battery_scaling: 1.0
  236.  
  237. # Can be used to scale import and export data, used for workarounds
  238. import_export_scaling: 1.0
  239.  
  240. # Export triggers:
  241. # For each trigger give a name, the minutes of export needed and the energy required in that time
  242. # Multiple triggers can be set at once so in total you could use too much energy if all run
  243. # Creates an entity called 'binary_sensor.predbat_export_trigger_<name>' which will be turned On when the condition is valid
  244. # connect this to your automation to start whatever you want to trigger
  245. export_triggers:
  246. - name: 'large'
  247. minutes: 60
  248. energy: 1.0
  249. - name: 'small'
  250. minutes: 15
  251. energy: 0.25
Add Comment
Please, Sign In to add comment