Added functionality for Tailgate and Average Speed.
Closed this issue · 1 comments
FireWizard52 commented
Hi,
While implementing MQTT function, I noted that both Average Speed and the Tailgate was missing in the sensor, resp binary sensor, section. So I made some add on coding in the dashboard py file.
It works for me, but I have no idea if there is a side effect in Home Assistant, such as the choice for the icon (mdi:ruler)
See below:
Sensor(
attr="fuelAmountLevel",
name="Fuel level",
icon="mdi:water-percent",
unit="%",
),
FuelConsumption(),
Sensor(
attr="distanceToEmpty", name="Range", icon="mdi:ruler", unit="km"
),
Sensor(
attr="averageSpeed",
name="Average speed",
icon="mdi:ruler",
unit="km/h",
),
Sensor(
attr="hvBattery.distanceToHVBatteryEmpty",
name="Battery range",
icon="mdi:ruler",
unit="km",
),
AND
BinarySensor(
attr="doors.rearRightDoorOpen",
name="Rear right door",
device_class="door",
),
BinarySensor(
attr="doors.tailgateOpen",
name="Tailgate",
device_class="door",
),
BinarySensor(
attr="windows.frontLeftWindowOpen",
name="Front left window",
device_class="window",
Please check.
molobrakos commented
Thanks, can you turn this into a pull request?