skodaconnect / homeassistant-myskoda

Homeassistant integration for MySkoda.
96 stars 15 forks source link

Remaining range for hybrid vehicles #170

Closed prvakt closed 2 weeks ago

prvakt commented 3 weeks ago

Noticed that remaining range (sensor.skoda_superb_combi_range) sensor is showing only electric range, but for hybrid vehicles there is primary and secondary engine range and total range. Can this be changed to provide separate sensor with remaining range for gasoline engine, electric engine and combined for hybrid vehicles?

superb_iv_2020_3v55xc_combi_l_and_k.yaml.txt

- endpoint: driving_range
  error: null
  raw: '{"carType": "hybrid", "totalRangeInKm": 803, "primaryEngineRange": {"engineType":
    "gasoline", "currentSoCInPercent": 100, "currentFuelLevelInPercent": 100, "remainingRangeInKm":
    760}, "secondaryEngineRange": {"engineType": "electric", "currentSoCInPercent":
    99, "remainingRangeInKm": 43}, "carCapturedTimestamp": "2024-11-03T12:28:25Z"}'
  result:
    car_captured_timestamp: '2024-11-03T12:28:25+00:00'
    car_type: hybrid
    primary_engine_range:
      current_fuel_level_in_percent: 100
      current_soc_in_percent: 100
      engine_type: gasoline
      remaining_range_in_km: 760
    secondary_engine_range:
      current_fuel_level_in_percent: null
      current_soc_in_percent: 99
      engine_type: electric
      remaining_range_in_km: 43
    total_range_in_km: 803
  success: true
  type: get
  url: /v2/vehicle-status/TMOCKAA0AA000000/driving-range
  vehicle_id: 0
WebSpider commented 3 weeks ago

This sounds like a reasonable adjustment.

prvakt commented 2 weeks ago

PR #267

prvakt commented 2 weeks ago

Completed in #267