Skip to content

Plan says car is charging, but sensor is off #3017

Description

@woopstar

Describe the bug
I would expect the plan details to say the car is not charging, since the sensor is off?

Predbat version
v8.29.0

Environment details
Huawei with 15kw battery, on HAOS Running on Proxmox

Screenshots
Image

Image

Activity

  1. gcoan commented on Dec 3, 2025

    @gcoan
    Collaborator

    Can you add the more detailed plan and log file please

  2. woopstar commented on Dec 3, 2025

    @woopstar
    Author

    predbat.log
    predbat_plan.html

    ---
    pred_bat:
      module: predbat
      class: PredBat
      prefix: predbat
      timezone: Europe/Copenhagen
      currency_symbols:
      - 'kr '
      - ' øre'
    
      threads: auto
    
      load_today:
      - sensor.energy_house_load_daily
      import_today:
      - sensor.energy_import_daily
      export_today:
      - sensor.energy_export_daily
      pv_today:
      - sensor.inverter_daily_yield
      export_power:
      - sensor.power_export
      import_power:
      - sensor.power_import
      grid_power:
      - sensor.power_meter_active_power
    
      grid_power_invert:
      - false
      battery_power_invert:
      - true
    
      num_inverters: 1
      inverter_type: "HU"
      balance_inverters_seconds: 0
    
      charge_rate:
        - number.batteries_maximum_charging_power
      discharge_rate:
        - number.batteries_maximum_discharging_power
      battery_power:
        - sensor.batteries_charge_discharge_power
      pv_power:
        - sensor.inverter_input_power
      load_power:
        - sensor.power_meter_active_power
      soc_percent:
        - sensor.batteries_state_of_capacity
      #soc_kw:
      #  - sensor.batteri_to_kw
      soc_max:
        - 15
      charge_limit:
        - number.batteries_end_of_charge_soc
      reserve:
        - 12
      scheduled_charge_enable:
        - sensor.predbat_hu_0_scheduled_charge_enable
      scheduled_discharge_enable:
        - sensor.predbat_hu_0_scheduled_discharge_enable
      charge_start_time:
        - input_datetime.predbat_charge_start
      charge_end_time:
        - input_datetime.predbat_charge_end
      discharge_start_time:
        - input_datetime.predbat_discharge_start
      discharge_end_time:
        - input_datetime.predbat_discharge_end
      battery_min_soc:
        - 4
    
      # Services to charge/discharge
      #charge_start_service: huawei_solar/forcible_charge_soc
      #charge_stop_service: huawei_solar/stop_forcible_charge
      #discharge_start_service: huawei_solar/forcible_discharge_soc
      #discharge_stop_service: huawei_solar/stop_forcible_charge
    
      # Services to charge/discharge
      charge_start_service:
        - service: huawei_solar.forcible_charge
          device_id: "{device_id}"
      charge_stop_service:
        - service: huawei_solar.stop_forcible_charge
          device_id: "{device_id}"
      discharge_start_service:
        - service: huawei_solar.forcible_discharge_soc
          device_id: "{device_id}"
      discharge_stop_service:
        - service: huawei_solar.stop_forcible_charge
          device_id: "{device_id}"
    
      device_id: c52adbd01ee1b99c48bed773e48ef079
      inverter_limit:
        - 10000
      battery_rate_max:
        - 5000
    
      #battery_charge_power_curve:
      #  91 : 0.91
      #  92 : 0.81
      #  93 : 0.71
      #  94 : 0.62
      #  95 : 0.52
      #  96 : 0.43
      #  97 : 0.33
      #  98 : 0.24
      #  99 : 0.24
      #  100 : 0.24
    
      clock_skew: 0
    
      pv_forecast_today: re:(sensor.(solcast_|)(pv_forecast_|)forecast_today)
      pv_forecast_tomorrow: re:(sensor.(solcast_|)(pv_forecast_|)forecast_tomorrow)
      pv_forecast_d3: re:(sensor.(solcast_|)(pv_forecast_|)forecast_(day_3|d3))
      pv_forecast_d4: re:(sensor.(solcast_|)(pv_forecast_|)forecast_(day_4|d4))
    
      car_charging_energy: re:sensor.go_echarger_222819_wh
    
      num_cars: 1
    
      car_charging_planned:
        - binary_sensor.go_echarger_222819_car
    
      car_charging_planned_response:
        - 'on'
    
      car_charging_now:
        - binary_sensor.go_e_charger_is_charging
    
      car_charging_now_response:
        - 'on'
    
      car_charging_battery_size:
        - 82
    
      car_charging_soc:
        - sensor.audi_e_tron_state_of_charge
    
      # Energy rates
      metric_energidataservice_import: sensor.energi_data_service
      metric_energidataservice_export: sensor.energi_data_service_produktion
    
      #rates_import:
      #  - start: "00:30:00"
      #    end: "04:30:00"
      #    rate: 7.5
      #  - start: "04:30:00"
      #    end: "00:30:00"
      #    rate: 40.0
      #
      #rates_export:
      #  -  rate: 0
    
      #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
      # Include one value for each days_previous value, each weighting on a separate line.
      # If any days_previous's that are not given a weighting they will assume a default weighting of 1.
      days_previous_weight:
        - 1
    
      # Number of hours forward to forecast, best left as-is unless you have specific reason
      forecast_hours: 48
    
      # 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.05
    
      # 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
  3. woopstar commented on Jan 1, 2026

    @woopstar
    Author

    Still trying to figure out why it says the car is charging. I wonder if its because its a binary sensor?

    Image Image
  4. woopstar commented on Jan 1, 2026

    @woopstar
    Author

    Or is it a configuration thing? Because I see the charging_now [False] from the debug log.

    21042 | 2026-01-01 20:00:53.888179: - Your car is currently charging.
    -- | --
    21030 | 2026-01-01 20:00:53.628648: CAR0: [ 73.0, 75.7, 78.4, 81.1, 83.8, 86.51, 89.21, 91.91, 94.61, 97.31, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0] kWh
    21020 | 2026-01-01 20:00:53.553195: CAR0: [ 73.0, 75.7, 78.4, 81.1, 83.8, 86.51, 89.21, 91.91, 94.61, 97.31, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0] kWh
    21010 | 2026-01-01 20:00:53.479603: CAR0: [ 73.0, 75.7, 78.4, 81.1, 83.8, 86.51, 89.21, 91.91, 94.61, 97.31, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0] kWh
    20999 | 2026-01-01 20:00:53.307445: CAR0: [ 73.0, 75.7, 78.4, 81.1, 83.8, 86.51, 89.21, 91.91, 94.61, 97.31, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0] kWh
    20984 | 2026-01-01 20:00:53.199162: Dynamic load adjust sees car 1 charging now slot 1200-1215, previous car slot True
    20983 | 2026-01-01 20:00:53.199107: Dynamic load last period 5.35kW, status high, threshold_battery 5.0kWh, threshold_car 1.3999999999999997kWh,
    20958 | 2026-01-01 20:00:50.256484: Today's actual load so far 55.81kWh with 34.52kWh car/iBoost excluded, and 33.64kWh import ignored.
    20957 | 2026-01-01 20:00:50.256477: Today's predicted so far 54.37kWh with 0.75kWh car/iBoost excluded, 35.92kWh import ignored, and 0kWh forecast extra.
    20954 | 2026-01-01 20:00:50.237041: Modal filter enabled - Discarding day 14 as it is the lowest of the 4 datapoints
    20952 | 2026-01-01 20:00:50.232547: Today's energy total net 124.52kWh, import 124.52kWh, export 0.0kWh, cost 6363.25 øre, import 6363.25 øre, export 0.0 øre, carbon 0.0kg
    20951 | 2026-01-01 20:00:50.170624: Last hour: net energy 0.04kWh, import 0.04kWh, export 0.0kWh, car 0.0kWh, load 3.96kWh, net cost 4.69 øre, import 4.69 øre, export 0.0 øre, car 0.0 øre, carbon 0.0kg
    20949 | 2026-01-01 20:00:50.152459: Car 0 charging plan is: [{'start': 1200, 'end': 1215, 'kwh': 2.525, 'average': 109.5, 'cost': 276.49}, {'start': 1215, 'end': 1230, 'kwh': 2.525, 'average': 109.5, 'cost': 276.49}, {'start': 1230, 'end': 1245, 'kwh': 2.525, 'average': 109.5, 'cost': 276.49}, {'start': 1245, 'end': 1260, 'kwh': 2.525, 'average': 109.5, 'cost': 276.49}, {'start': 1260, 'end': 1275, 'kwh': 2.525, 'average': 69.8, 'cost': 176.24}, {'start': 1275, 'end': 1290, 'kwh': 2.525, 'average': 69.8, 'cost': 176.24}, {'start': 1290, 'end': 1305, 'kwh': 2.525, 'average': 69.8, 'cost': 176.24}, {'start': 1305, 'end': 1320, 'kwh': 2.525, 'average': 69.8, 'cost': 176.24}, {'start': 1320, 'end': 1335, 'kwh': 2.525, 'average': 68.5, 'cost': 172.96}, {'start': 1335, 'end': 1350.0, 'kwh': 2.514, 'average': 68.5, 'cost': 172.22}]
    20948 | 2026-01-01 20:00:50.152284: Car 0 plan charging from 62.78 to 86.0, with slots [{'start': 1200, 'end': 1215, 'average': 109.5}, {'start': 1215, 'end': 1230, 'average': 109.5}, {'start': 1230, 'end': 1245, 'average': 109.5}, {'start': 1245, 'end': 1260, 'average': 109.5}, {'start': 1260, 'end': 1275, 'average': 69.8}, {'start': 1275, 'end': 1290, 'average': 69.8}, {'start': 1290, 'end': 1305, 'average': 69.8}, {'start': 1305, 'end': 1320, 'average': 69.8}, {'start': 1320, 'end': 1335, 'average': 68.5}, {'start': 1335, 'end': 1350, 'average': 68.5}, {'start': 1350, 'end': 1365, 'average': 68.5}, {'start': 1365, 'end': 1380, 'average': 68.5}, {'start': 1380, 'end': 1395, 'average': 71.3}, {'start': 1395, 'end': 1410, 'average': 71.3}, {'start': 1410, 'end': 1425, 'average': 71.3}, {'start': 1425, 'end': 1440, 'average': 71.3}, {'start': 1440, 'end': 1455, 'average': 39.4}, {'start': 1455, 'end': 1470, 'average': 39.4}, {'start': 1470, 'end': 1485, 'average': 39.4}, {'start': 1485, 'end': 1500, 'average': 39.4}, {'start': 1500, 'end': 1515, 'average': 37.5}, {'start': 1515, 'end': 1530, 'average': 37.5}, {'start': 1530, 'end': 1545, 'average': 37.5}, {'start': 1545, 'end': 1560, 'average': 37.5}, {'start': 1560, 'end': 1575, 'average': 38.9}, {'start': 1575, 'end': 1590, 'average': 38.9}, {'start': 1590, 'end': 1605, 'average': 38.9}, {'start': 1605, 'end': 1620, 'average': 38.9}, {'start': 1620, 'end': 1635, 'average': 33.1}, {'start': 1635, 'end': 1650, 'average': 33.1}, {'start': 1650, 'end': 1665, 'average': 33.1}, {'start': 1665, 'end': 1680, 'average': 33.1}, {'start': 1680, 'end': 1695, 'average': 34.2}, {'start': 1695, 'end': 1710, 'average': 34.2}, {'start': 1710, 'end': 1725, 'average': 34.2}, {'start': 1725, 'end': 1740, 'average': 34.2}, {'start': 1740, 'end': 1755, 'average': 39.4}, {'start': 1755, 'end': 1770, 'average': 39.4}, {'start': 1770, 'end': 1785, 'average': 39.4}, {'start': 1785, 'end': 1800, 'average': 39.4}, {'start': 1800, 'end': 1815, 'average': 65.2}, {'start': 1815, 'end': 1830, 'average': 65.2}, {'start': 1830, 'end': 1845, 'average': 65.2}, {'start': 1845, 'end': 1860, 'average': 65.2}, {'start': 1860, 'end': 1875, 'average': 89.0}, {'start': 1875, 'end': 1890, 'average': 89.0}, {'start': 1890, 'end': 1905, 'average': 89.0}, {'start': 1905, 'end': 1920, 'average': 89.0}, {'start': 1920, 'end': 1935, 'average': 105.1}, {'start': 1935, 'end': 1950, 'average': 105.1}, {'start': 1950, 'end': 1965, 'average': 105.1}, {'start': 1965, 'end': 1980, 'average': 105.1}, {'start': 1980, 'end': 1995, 'average': 107.3}, {'start': 1995, 'end': 2010, 'average': 107.3}, {'start': 2010, 'end': 2025, 'average': 107.3}, {'start': 2025, 'end': 2040, 'average': 107.3}, {'start': 2040, 'end': 2055, 'average': 96.1}, {'start': 2055, 'end': 2070, 'average': 96.1}, {'start': 2070, 'end': 2085, 'average': 96.1}, {'start': 2085, 'end': 2100, 'average': 96.1}, {'start': 2100, 'end': 2115, 'average': 94.0}, {'start': 2115, 'end': 2130, 'average': 94.0}, {'start': 2130, 'end': 2145, 'average': 94.0}, {'start': 2145, 'end': 2160, 'average': 94.0}, {'start': 2160, 'end': 2175, 'average': 95.0}, {'start': 2175, 'end': 2190, 'average': 95.0}, {'start': 2190, 'end': 2205, 'average': 95.0}, {'start': 2205, 'end': 2220, 'average': 95.0}, {'start': 2220, 'end': 2235, 'average': 103.4}, {'start': 2235, 'end': 2250, 'average': 103.4}, {'start': 2250, 'end': 2265, 'average': 103.4}, {'start': 2265, 'end': 2280, 'average': 103.4}, {'start': 2280, 'end': 2295, 'average': 106.3}, {'start': 2295, 'end': 2310, 'average': 106.3}, {'start': 2310, 'end': 2325, 'average': 106.3}, {'start': 2325, 'end': 2340, 'average': 106.3}, {'start': 2340, 'end': 2355, 'average': 113.2}, {'start': 2355, 'end': 2370, 'average': 113.2}, {'start': 2370, 'end': 2385, 'average': 113.2}, {'start': 2385, 'end': 2400, 'average': 113.2}, {'start': 2400, 'end': 2415, 'average': 117.8}, {'start': 2415, 'end': 2430, 'average': 117.8}, {'start': 2430, 'end': 2445, 'average': 117.8}, {'start': 2445, 'end': 2460, 'average': 117.8}, {'start': 2460, 'end': 2475, 'average': 168.5}, {'start': 2475, 'end': 2490, 'average': 168.5}, {'start': 2490, 'end': 2505, 'average': 168.5}, {'start': 2505, 'end': 2520, 'average': 168.5}, {'start': 2520, 'end': 2535, 'average': 171.2}, {'start': 2535, 'end': 2550, 'average': 171.2}, {'start': 2550, 'end': 2565, 'average': 171.2}, {'start': 2565, 'end': 2580, 'average': 171.2}, {'start': 2580, 'end': 2595, 'average': 171.4}, {'start': 2595, 'end': 2610, 'average': 171.4}, {'start': 2610, 'end': 2625, 'average': 171.4}, {'start': 2625, 'end': 2640, 'average': 171.4}, {'start': 2700, 'end': 2715, 'average': 118.8}, {'start': 2715, 'end': 2730, 'average': 118.8}, {'start': 2730, 'end': 2745, 'average': 118.8}, {'start': 2745, 'end': 2760, 'average': 118.8}, {'start': 2760, 'end': 2775, 'average': 120.8}, {'start': 2775, 'end': 2790, 'average': 120.8}, {'start': 2790, 'end': 2805, 'average': 120.8}, {'start': 2805, 'end': 2820, 'average': 120.8}, {'start': 2820, 'end': 2835, 'average': 117.2}, {'start': 2835, 'end': 2850, 'average': 117.2}, {'start': 2850, 'end': 2865, 'average': 117.2}, {'start': 2865, 'end': 2880, 'average': 117.2}, {'start': 2880, 'end': 2895, 'average': 39.4}, {'start': 2895, 'end': 2910, 'average': 39.4}, {'start': 2910, 'end': 2925, 'average': 39.4}, {'start': 2925, 'end': 2940, 'average': 39.4}, {'start': 2940, 'end': 2955, 'average': 37.5}, {'start': 2955, 'end': 2970, 'average': 37.5}, {'start': 2970, 'end': 2985, 'average': 37.5}, {'start': 2985, 'end': 3000, 'average': 37.5}, {'start': 3000, 'end': 3015, 'average': 38.9}, {'start': 3015, 'end': 3030, 'average': 38.9}, {'start': 3030, 'end': 3045, 'average': 38.9}, {'start': 3045, 'end': 3060, 'average': 38.9}, {'start': 3060, 'end': 3075, 'average': 33.1}, {'start': 3075, 'end': 3090, 'average': 33.1}, {'start': 3090, 'end': 3105, 'average': 33.1}, {'start': 3105, 'end': 3120, 'average': 33.1}, {'start': 3120, 'end': 3135, 'average': 34.2}, {'start': 3135, 'end': 3150, 'average': 34.2}, {'start': 3150, 'end': 3165, 'average': 34.2}, {'start': 3165, 'end': 3180, 'average': 34.2}, {'start': 3180, 'end': 3195, 'average': 39.4}, {'start': 3195, 'end': 3210, 'average': 39.4}, {'start': 3210, 'end': 3225, 'average': 39.4}, {'start': 3225, 'end': 3240, 'average': 39.4}, {'start': 3240, 'end': 3255, 'average': 65.2}, {'start': 3255, 'end': 3270, 'average': 65.2}, {'start': 3270, 'end': 3285, 'average': 65.2}, {'start': 3285, 'end': 3300, 'average': 65.2}, {'start': 3300, 'end': 3315, 'average': 89.0}, {'start': 3315, 'end': 3330, 'average': 89.0}, {'start': 3330, 'end': 3345, 'average': 89.0}, {'start': 3345, 'end': 3360, 'average': 89.0}, {'start': 3360, 'end': 3375, 'average': 105.1}, {'start': 3375, 'end': 3390, 'average': 105.1}, {'start': 3390, 'end': 3405, 'average': 105.1}, {'start': 3405, 'end': 3420, 'average': 105.1}, {'start': 3420, 'end': 3435, 'average': 107.3}, {'start': 3435, 'end': 3450, 'average': 107.3}, {'start': 3450, 'end': 3465, 'average': 107.3}, {'start': 3465, 'end': 3480, 'average': 107.3}, {'start': 3480, 'end': 3495, 'average': 96.1}, {'start': 3495, 'end': 3510, 'average': 96.1}, {'start': 3510, 'end': 3525, 'average': 96.1}, {'start': 3525, 'end': 3540, 'average': 96.1}, {'start': 3540, 'end': 3555, 'average': 94.0}, {'start': 3555, 'end': 3570, 'average': 94.0}, {'start': 3570, 'end': 3585, 'average': 94.0}, {'start': 3585, 'end': 3600, 'average': 94.0}, {'start': 3600, 'end': 3615, 'average': 95.0}, {'start': 3615, 'end': 3630, 'average': 95.0}, {'start': 3630, 'end': 3645, 'average': 95.0}, {'start': 3645, 'end': 3660, 'average': 95.0}, {'start': 3660, 'end': 3675, 'average': 103.4}, {'start': 3675, 'end': 3690, 'average': 103.4}, {'start': 3690, 'end': 3705, 'average': 103.4}, {'start': 3705, 'end': 3720, 'average': 103.4}, {'start': 3720, 'end': 3735, 'average': 106.3}, {'start': 3735, 'end': 3750, 'average': 106.3}, {'start': 3750, 'end': 3765, 'average': 106.3}, {'start': 3765, 'end': 3780, 'average': 106.3}, {'start': 3780, 'end': 3795, 'average': 113.2}, {'start': 3795, 'end': 3810, 'average': 113.2}, {'start': 3810, 'end': 3825, 'average': 113.2}, {'start': 3825, 'end': 3840, 'average': 113.2}, {'start': 3840, 'end': 3855, 'average': 117.8}, {'start': 3855, 'end': 3870, 'average': 117.8}, {'start': 3870, 'end': 3885, 'average': 117.8}, {'start': 3885, 'end': 3900, 'average': 117.8}, {'start': 3900, 'end': 3915, 'average': 168.5}, {'start': 3915, 'end': 3930, 'average': 168.5}, {'start': 3930, 'end': 3945, 'average': 168.5}, {'start': 3945, 'end': 3960, 'average': 168.5}, {'start': 3960, 'end': 3975, 'average': 171.2}, {'start': 3975, 'end': 3990, 'average': 171.2}, {'start': 3990, 'end': 4005, 'average': 171.2}, {'start': 4005, 'end': 4020, 'average': 171.2}, {'start': 4020, 'end': 4035, 'average': 171.4}, {'start': 4035, 'end': 4050, 'average': 171.4}, {'start': 4050, 'end': 4065, 'average': 171.4}, {'start': 4065, 'end': 4080, 'average': 171.4}] from SoC 62.78% to 86.0%, ready by 07:00:00
    20939 | 2026-01-01 20:00:49.889244: Cars: SoC: [62.78]kWh, Charge limit [86.0]%, plan time ['07:00:00'], battery size [86.0]kWh
    20933 | 2026-01-01 20:00:40.950315: Cars 1 charging from battery False planned [True], charging_now [False] smart [False], max_price [0.0] øre, plan_time ['07:00:00'], battery size [86.0]kWh, limit [86.0]%, rate [10.1]W, exclusive [False]
    20932 | 2026-01-01 20:00:40.950046: Configuration: forecast_hours 48, num_cars 1, debug enable is True, calculate_plan_every 10 minutes
    
  5. springfall2008 commented on Oct 5, 2026

    @springfall2008
    Owner

    Automated first-pass triage - a maintainer will review before any action is taken. I investigated using the files attached on this ticket (predbat.log, predbat_plan.html, apps.yaml) against current main (v9.3.5).

    Classification: bug (priority_medium) - and the main part of this was already fixed in v9.3.0.

    What I verified from the attachments

    Your log (v8.29.0) shows the signature of the whole report:

    • car_charging_planned -> binary_sensor.go_echarger_222819_car with car_charging_planned_response: 'on' -> Predbat reads "car connected" as "charge is planned". That wiring is correct and documented (planned = car connected to the charger), so this is not a misconfiguration.
    • planned [True], charging_now [False] smart [False] - the important one is smart [False]. You never set car_charging_plan_smart in apps.yaml, so that False is the shipped default of v8.29.0: in your version both config.py and the fetch.py read defaulted car_charging_plan_smart to False. With Smart off, Predbat plans the car in "all low-rate slots in time order", i.e. it fills the charge need starting from the slot it is plugged in, at whatever price that slot has, even when cheaper slots come later. Your log shows exactly that: Car 0 charging plan is: [{'start': 455...}] - a slot starting at the current minute (07:35, rates 187.2-231.4 ore/kWh, the most expensive of the day), and your plan screenshot from 20:00 shows 23 kWh slotted 20:00-22:30 at 109.5 ore/kWh while 33-39 ore/kWh slots sat overnight before the 07:00 ready time.
    • "Your car is currently charging." in the Plan details comes from the plan, not from your charging sensor. In output.py (plan-details builder) that sentence is printed when the plan's car charging kWh over the current 5-minute slot (car_charge_slot_kwh(minutes_now, minutes_now + 5)) is greater than zero - i.e. it reports plan intent for the current slot, in present tense. The docstring for the disabled-Smart behaviour now literally describes "the car starts charging in the first low-rate slot after it is plugged in, even when cheaper slots come later" - so the plan and that sentence were both showing intent, while your go-e is_charging binary sensor (wired correctly to car_charging_now) legitimately says the car is not charging. The plan-details text describes the planned battery/car behaviour throughout (the "The battery is currently at X% and is ..." sentence is also plan-derived), so this is a wording/UX weakness rather than the plan being wrong - flagged below for the maintainer.
    • Dynamic load amplifies the effect: it adds the car's rate to the current slot's load forecast whenever the plan has a car slot there ("Dynamic load adjust sees car 1 charging now slot 1200-1215"), so a plan-intent slot makes the load forecast expect charging that has not started.
    • On your "is it because it's a binary sensor?" question - no: binary vs text sensor isn't the cause. The two entities answer different questions: binary_sensor.go_echarger_222819_car (car connected) -> car_charging_planned = "a charge is wanted", binary_sensor.go_e_charger_is_charging -> car_charging_now = "charging at this minute". The plan schedules from planned; the current-state sentence in plan details describes plan intent. Both entities are wired correctly.

    Why the plan sometimes showed car charging slots with the car already full

    In your 06:30/12:05 log cycles the car sits at SoC 82.0 kWh = charge limit 82.0 kWh, and the plan correctly schedules nothing (attached plan HTML: Car 0.0 kWh total, no car slots). The visible car slots appear in the later cycles where the car had been driven and plugged back in below the limit - and because of the non-smart default, they start at "now" regardless of price.

    How to fix it

    • Immediate fix at your current version: turn On switch.predbat_car_charging_plan_smart - Predbat then picks the cheapest slots before the ready time instead of the first slots after plug-in (for your 20:00 example that would be the 33-39 ore/kWh overnight slots before 07:00 instead of 20:00-22:30 at 109.5 ore/kWh).
    • The shipped default was switched from Off to On in v9.3.0 (commit 9a82b439, PR fix(car): default car_charging_plan_smart to on (#5237) #5251, tracked as Saving session distorts import-side slot selection, causing peak-rate car/battery charging #5237 - where the maintainer named "car_charging_plan_smart: false (default)" as the cause of peak-rate car charging). If you upgrade to v9.3.0+, check the switch afterwards: the persisted Off state from an earlier install may not reset itself to the new default.
    • Not related to the Huawei inverter named in the environment details - the battery side behaved as planned in the attached plan.

    For the maintainer (still true on current main): the plan-details sentence "Your car is currently charging." (output.py plan-details builder, derived from car_charge_slot_kwh(minutes_now, minutes_now + 5) > 0) reports plan intent in present tense while ignoring the car_charging_now sensor when one is configured - exactly what made this hard for the reporter to interpret. When a car_charging_now sensor exists and reads False, that line could read "your car is planned to charge now" instead, or fall back to "planned car charging" wording. Optional wording polish, no functional fix needed.

    Related: #5237 (same trigger - non-smart default causing peak-rate car charging, fixed in v9.3.0), #2716 (parent thread of #5237), #4416 (a different failure mode of the same setting when max_price is used). Not a duplicate: those tickets cover the slot-selection distortion and max_price modes; this one was the "planned car charging reads as charging-now" interpretation on an older default.

  6. added
    BOT_TRIAGEDHas been through the triage bot
    bugSomething isn't working
    and removed
    BOT_REVIEWTrigger an autotriage
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions