fordpass-ha
fordpass-ha copied to clipboard
PHEV Battery percentage
Hi guys, thanks to this integration I've been able to get some data in my HA. Ty I own a Ford Kuga PHEV 2020. But I still have 2 issues.
Here some screens to give you some context
Issue 1: PHEV Battery Percentage is missing
As you can see from HA screen, the sensor fordpass_elVeh
tells me how many km I can run with my battery, but I would need to know how much PHEV battery is left (so the 31%). And this is for a few reasons:
- I want to know when PHEV battery is too low to trigger some events (recharge, notifications on mobile)
- I want to monitor the PHEV battery performance How can I create a sensor that shows that specific data? And to be more specific, I would not like to translate 19km in a percentage because the 19kms are an estimation made by Ford. If possible, I would like to get the plain data of the PHEV battery.
Issue 2: Top Right data is misleading
In HA, on the device detail screen (see screenshot) the 80% on battery can mislead a user. The main data should be the PHEV battery, and not the other batter (to let the car turn on). How can we change the main data for that screen (once we have the % of the PHEV battery)?
Issue 1 - check the attributes:
Ty @Ulrich72
I solved adding this sensors to configuration.yaml
file:
template:
- sensor:
- name: "Ford elVeh Battery Level"
unique_id: "1133"
state: "{{state_attr('sensor.fordpass_elVeh', 'Battery Charge') }}"
unit_of_measurement: "%"
icon: >-
{% set batteryLevel = states('sensor.ford_elveh_battery_level') | round (-1) | int %}
{% if batteryLevel == 100 %}
mdi:battery
{% else %}
mdi:battery-{{ batteryLevel }}
{% endif %}
- name: "Ford elVeh Battery Charging Status"
unique_id: "1144"
state: "{{state_attr('sensor.fordpass_elVehCharging', 'Charging Status') }}"
icon: >-
{% if is_state_attr('sensor.fordpass_elVehCharging', 'Charging Status', "IN_PROGRESS") %}
mdi:ev-station
{% else %}
mdi:battery
{% endif %}