diff --git a/config.schema.json b/config.schema.json index cda0a59..f4261b9 100644 --- a/config.schema.json +++ b/config.schema.json @@ -58,12 +58,12 @@ "description": "Duration of engine remote start. Only applicable if feature is supported by your car." }, "batteryLowThreshold": { - "title": "EV Battery threshold", + "title": "EV Battery/fuel threshold", "type": "integer", "placeholder": 20, "minimum": 1, "maximum": 99, - "description": "Threshold (percentage) for battery low status in HomeKit. Only applicable for EV or plugin hybrids." + "description": "Threshold (percentage) for battery low status in HomeKit. If your vehicle is not an EV, this will reflect the fuel level for your car." }, "enabledFeatures": { "type": "object", diff --git a/src/util/vehicle.ts b/src/util/vehicle.ts index 1a27af2..c48e561 100644 --- a/src/util/vehicle.ts +++ b/src/util/vehicle.ts @@ -112,7 +112,7 @@ export class Vehicle extends VehicleApi { case VolvoSensorBindings.FUEL_PERCENT_LOW: value = - this.state.fuelAmountLevel < 20 + this.state.fuelAmountLevel < this.config.batteryLowThreshold ? this.Characteristic.StatusLowBattery.BATTERY_LEVEL_LOW : this.Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL; break;