Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elVeh Battery Attribute #123

Closed
graemebiggs opened this issue Sep 8, 2021 · 10 comments
Closed

elVeh Battery Attribute #123

graemebiggs opened this issue Sep 8, 2021 · 10 comments

Comments

@graemebiggs
Copy link

It would be great to have the elVeh entity attributes broken out into their own entities. I have been unable to break out the battery fill level attribute using templates, which is really the main thing I am interested in with an EV.

@tobox
Copy link

tobox commented Sep 22, 2021

Same problem here... I would love to monitor SoC, but I cannot find it in the current entities.

@colings
Copy link

colings commented Sep 24, 2021

This works for me.

  • platform: template
    sensors:
    car_voltage:
    friendly_name: "Car Charge Level"
    value_template: "{{state_attr('sensor.fordpass_elVeh', 'Battery Fill Level')}}"
    unit_of_measurement: "%"

@tobox
Copy link

tobox commented Sep 27, 2021

Thanks for the hint, it works for me too. I was unaware that there were additional attributes "hidden" inside the elVeh entity. I am relatively new to Homeassistant...

@itchannel
Copy link
Owner

Thanks @colings for posting your template. I did think about expanding out the elveh attributes but it's a lot cleaner to just have them as extras and then users can just use a template where needed if you want individual sensors.

@Bert-R
Copy link
Contributor

Bert-R commented Sep 27, 2021

The same can be done for the remaining range. Note that the first character shows as uppercase in Lovelace, but in reality is lower case (elVehDTE):

template:
  - sensor:
    - name: "Remaining range"
      unique_id: sensor_ford_remaining_range
      state: "{{state_attr('sensor.fordpass_elVeh', 'elVehDTE')}}"
      unit_of_measurement: "km"

@OArndt
Copy link

OArndt commented Jan 9, 2022

Hey everyone,
I just finished setting up my first HA-instance and wanted to add the aforementioned attributes to my UI.
However, I'm kinda lost. I tried adding this

  - platform: template
  - sensor:
      - name: "Battery charge level"
        friendly_name: "Car Charge Level"
        unique_id: sensor.ford_car_charge_level
        value_template: "{{state_attr('sensor.fordpass_elVeh', 'Battery Fill Level')}}"
        unit_of_measurement: "%"

      - name: "Remaining range"
        friendly_name: "Car remaining range"
        unique_id: sensor.ford_remaining_range
        state: "{{state_attr('sensor.fordpass_elVeh', 'elVehDTE')}}"
        unit_of_measurement: "km"

to my /config/configuration.yaml, but I just get an error saying

"bad indentation of a mapping entry at line 16, column 13:
- platform: template"

and no new entity to add to my overview

What am I doing wrong?
Sorry if this is a noob question, but I'm kinda lost here...
Any help is really appreciated!
Thanks!

@tballarin
Copy link

tballarin commented Feb 24, 2022

@OArndt, you can test this code on your config/configuration.yaml

template:
  - sensor:
    - name: "Remaining range"
      unique_id: sensor_ford_remaining_range
      state: "{{state_attr('sensor.fordpass_elVeh', 'elVehDTE')}}"
      unit_of_measurement: "km"
  - sensor:
    - name: "Battery charge level"
      unique_id: sensor_ford_car_charge_level
      state: "{{state_attr('sensor.fordpass_elVeh', 'Battery Fill Level')}}"
      unit_of_measurement: "%"

@7ooL
Copy link

7ooL commented Jun 24, 2022

I used this for an entity filter to know if the car was plugged in our not

binary_sensor:
 - platform: template
    sensors:
      ford_mache_plug_status:
        friendly_name: "Plug Status"
        value_template: "{{state_attr('sensor.fordpass_elVeh', 'Plug Status')}}"
        device_class: plug
        unique_id: ford_mache_plug_status

@tgriek
Copy link

tgriek commented Aug 1, 2022

I do think it is nicer to have them as separate attributes. I expect the most used sensor out of this integration is battery status. Happy to make a pull request for it.

@itchannel
Copy link
Owner

Elveh and elvehcharging are the two new sensors. Have all electric car information required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants