itchannel / fordpass-ha

Fordpass integration for Home Assistant
311 stars 56 forks source link

Battery Logic #88

Closed paulgbrichardson closed 3 years ago

paulgbrichardson commented 3 years ago

The battery sensor is always STATUS_LOW, but I have a voltage of 13... I updated it manually to STATUS_GOOD but the next update from Ford set it back to Low. I have done ~10 hours of driving over the last three days and either I have a dodgy battery (maybe?) or the logic for the battery sensor isn't quite right.

I did get a low battery alert from Ford a while back as the car was not used due to local lockdowns, but it has been driven a lot since then.

itchannel commented 3 years ago

So mine reads as a voltage of 12v and STATUS_GOOD. The status value is set by the ford API so I can only think that there might be something wrong with your battery or it's a little wobbly with your version of car.

Do you have any alerts or messages in the Ford app?

This is what mine looks like

image

denperss commented 3 years ago

How can i add the battery voltage instead of "STATUS_GOOD" ?

paulgbrichardson commented 3 years ago

How can i add the battery voltage instead of "STATUS_GOOD" ?

Its an attribute of the battery sensor. If you want it as it's own sensor then create a template sensor -

- platform: template
  sensors:
    car_voltage:
      friendly_name: "Car Voltage"
      value_template: "{{state_attr('sensor.fordpass_battery', 'Battery Voltage') }}"
      unit_of_measurement: "Volts"
denperss commented 3 years ago

Oh thank u so much Paul,

Is that the same for the Phev battery ?

paulgbrichardson commented 3 years ago

Oh thank u so much Paul,

Is that the same for the Phev battery ?

Pass... I don't have an electric car (I wish!!!)

paulgbrichardson commented 3 years ago

So mine reads as a voltage of 12v and STATUS_GOOD. The status value is set by the ford API so I can only think that there might be something wrong with your battery or it's a little wobbly with your version of car.

Do you have any alerts or messages in the Ford app?

This is what mine looks like

image

Certainly weird as it drops to 12 and still says Low. I got a warning from the FordPass App in Jan, but nothing since. I have noticed though that the screen in the car says "System turning off to save battery". Its due a service in a month or two so I'll mention it then, sounds like somethings gone screwy.

denperss commented 3 years ago

What car model do u have and year? When is the last time u got it system updated from Ford ?

paulgbrichardson commented 3 years ago

Ford Fiesta - 2019. Its never been into Ford for a service as less than 2 years old. I'll try a system update one of these days, easier said than done, as I can't park close enough to my property to connect to wifi.

denperss commented 3 years ago

Okay thats the reason why u having this issue with (System turning off to save battery)

U need to go to a ford dealer tell them about the issue and ask them to update your car.. This should bee free ;)

Then i think that your problem will be solved in HA after that :) !

denperss commented 3 years ago

They have to do it from the Shop its firmware that endusers dont have access to :(

paulgbrichardson commented 3 years ago

Good to know, not in a rush but might book the service sooner than later, its due May time anyway!

denperss commented 3 years ago

👍

denperss commented 3 years ago

How can i add the battery voltage instead of "STATUS_GOOD" ?

Its an attribute of the battery sensor. If you want it as it's own sensor then create a template sensor -

- platform: template
  sensors:
    car_voltage:
      friendly_name: "Car Voltage"
      value_template: "{{state_attr('sensor.fordpass_battery', 'Battery Voltage') }}"
      unit_of_measurement: "Volts"

Hi Paul,

Do u know how to do it with the chargeing state as well ? ex state: ChargeTargetReached, Charging, Notready, EvsePaused

EvsePaused = Paused ChargeTargetReached = Fully charged Notready = Not Charged Charging = Charging car

paulgbrichardson commented 3 years ago

I can't help much as I don't have that entity but something like below. If you are also using the last sensor then skip the first two lines.... I followed the following so should be almost there... https://www.home-assistant.io/integrations/template/#renaming-sensor-output

- platform: template
  sensors:
    car_charging:
      friendly_name: "Car Charging Status"
      value_template: >-
        {% if is_state('sensor.fordpass_elveh', 'EvsePaused') %} 
          Paused
        {% elif  is_state('sensor.fordpass_elveh', 'ChargeTargetReached') %}
          Fully charged
        {% elif  is_state('sensor.fordpass_elveh', 'Notready') %}
          Not Charged
        {% elif  is_state('sensor.fordpass_elveh', 'Charging') %}
          Charging car
        {% else %}
        {% endif %}
denperss commented 3 years ago

Im just getting, unknown status :(

paulgbrichardson commented 3 years ago

Can you take a screenshot of the entity in the developer tab? Mine just shows Unsupported as I don't have an EV car.

On Wed, Mar 31, 2021 at 3:22 PM denperss @.***> wrote:

Im just getting, unknown status :(

  • platform: template sensors: car_charge: friendly_name: "Ladestatus" value_template: >- {% if is_state('sensor.fordpass_elveh', 'EvsePaused') %} Standby {% elif is_state('sensor.fordpass_elveh', 'ChargeTargetReached') %} Full charged {% elif is_state('sensor.fordpass_elveh', 'Notready') %} Not charging {% elif is_state('sensor.fordpass_elveh', 'Charging') %} Charging car {% else %} {% endif %}

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/itchannel/fordpass-ha/issues/88#issuecomment-811107947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAK33PTNWDBKDB3UXHNS53TGMV4HANCNFSM4Y3KFK3A .

denperss commented 3 years ago

I got it working, i forgot a singel letter :( 👍