GithubHelp home page GithubHelp logo

tmjo / charger-card Goto Github PK

View Code? Open in Web Editor NEW
83.0 4.0 53.0 1.26 MB

A lovelace card for electrical vehicle (EV) home chargers and charging robots.

License: MIT License

JavaScript 10.79% TypeScript 89.21%
charger evcharger electric-vehicle elbil easee home-assistant homeassistant hacs hass lovelace

charger-card's People

Contributors

alandtse avatar aunefyren avatar citrowallon avatar deermaximum avatar dykanddk avatar gerardag avatar jockesoft avatar posixx avatar purcell-lab avatar tmjo avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

charger-card's Issues

No spacing between image and state text in compact view

Checklist:

  • [x ] I updated to the latest version available
  • [x ] I cleared the cache of my browser

Release with the issue:
v0.2.7

Last working release (if known):

Browser and Operating System:
Firefox/Chrome on Windows 10

Description of problem:

In compact view there is no margin/padding between the charger image and the entity state. Also at least for the Chargepoint CPH50 below the state text it shows undefined. Here is an image:
image

Card moving left and right on small device

The issue started with the update of HA 2023.4.
When the charger card setting is set to eg. Easee, the card is moving to the sides, when scrolling on small device.
I am not having the issue with any other custom cards.
I hope the attached images helps ilustrate the issue.
File (2)

Help with customizing the card

Hello! Thanks for this great addition to Home Assistant. I am struggling to understand how the card is customized. I am trying to do the following:

  • compact
  • remove sitename (and preferrable the '-' hyphen before the chargername
  • customize the text for statuses (they are too long on mobile device screens)

Here is my card setup. The only achievement I made is compact mode.... :O

  - type: 'custom:charger-card'
    brand: easee
    entity: sensor.lader1_status
    chargerImage: Black
    details:
      name:
        entity_id: sensor.lader1_status
        attribute: site_name
      statetext:
        disconnected: "Frakoblet"
        awaiting_start: "Avventer Start"
        charging: "Lader"
        completed: "Fullført"
        error: "Feil"
        ready_to_charge: "Klar for Lading"
    compact_view: true
    show_collapsibles: true

Sorry if this the wrong place to ask. If at all I would like to get some examples in the doc so I could more easily understand.

Zappi adaptation - first proposal - help needed

Thank you for this card - much appreciated!
Could you help me with a Zappi adaptation?
I am only a newbie with no experience here - I made my first attempt in adapting the card. It works just fine, but would need help to get the group1 mode change functionality to work, for it to actually call the service of eco/eco+/boost/stop of the zappi.

Thankful for any guidance!

Here is how it looks on pics and the code
zappi Screenshot 2023-02-17 130622
zappi Screenshot 2023-02-17 130622 select

type: custom:charger-card
title: Zappi EV Charger
entity: sensor.myenergi_zappi_xxx_status
customCardTheme: theme_transp_white
customImage: /local/media/white_zappi-removebg-preview.png
brand: zappi
show_leds: false
details:
  status:
    entity_id: sensor.myenergi_zappi_xxx_status
  substatus:
    entity_id: null
    unit_show: true
  smartcharging:
    entity_id: switch.myenergi_zappi_xxx_charge_mode
  currentlimits:
    - Fast
    - Eco
    - Eco+
    - Stopped
  statetext:
    Charging: Charging
    Paused: Paused
    Stopped: Stopped
    Completed: Complete
    Boosting: Boosting
  collapsiblebuttons:
    group1:
      text: Charger Mode
      icon: mdi:speedometer
    group2:
      text: Info
      icon: mdi:information
    group3:
      text: Settings
      icon: mdi:cog
  info_left:
    - entity_id: sensor.myenergi_zappi_xxx_plug_status
      text: Connection Status
    - entity_id: sensor.myenergi_xxx_power_charging
      text: Charge Power NOW
      unit_show: true
      icon: mdi:car-electric
  info_right:
    - entity_id: sensor.bmw_530e_remaining_battery_percent
      text: Car Battery Charge %
      icon: mdi:car-electric-outline
      unit_show: true
  group1:
    - entity_id: select.myenergi_zappi_xxx_charge_mode
      tap_action:
        action: call-service
        service: select.select_option
        data:
          option: Eco
        target:
          entity_id: select.myenergi_zappi_xxx_charge_mode
  group2:
    - entity_id: sensor.myenergi_xxx_power_charging
      unit_show: true
      text: Charge NOW
      icon: mdi:car-electric
    - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
      unit_show: true
      text: Charge in Last Session
    - entity_id: sensor.myenergi_zappi_xxx_energy_used_today
      unit_show: true
      text: Grid Use Today
      icon: mdi:transmission-tower-export
    - entity_id: sensor.bmw_530e_remaining_battery_percent
      unit_show: true
      icon: mdi:battery-charging-medium
      text: Car Battery Charge %
    - entity_id: sensor.myenergi_xxx_voltage_grid
      unit_show: true
      text: Grid Voltage
      icon: mdi:flash-triangle-outline
    - entity_id: sensor.myenergi_xxx_frequency_grid
      unit_show: true
      text: Grid Frequency
  group3:
    - entity_id: number.myenergi_zappi_xxx_device_priority
      unit_show: true
      text: Device Priority
    - entity_id: number.myenergi_zappi_xxx_minimum_green_level
      unit_show: true
      text: Minimum Green Level
  stats:
    default:
      - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
        text: Charge in Last Session
        unit_show: true
      - entity_id: select.myenergi_zappi_xxx_charge_mode
        text: Charge Mode
    Charging:
      - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
        text: Charge in Last Session
        unit_show: true
      - entity_id: sensor.myenergi_xxx_power_charging
        text: Charge Power Now
        unit_show: true
      - entity_id: select.myenergi_zappi_xxx_charge_mode
        text: Charge Mode
    Paused:
      - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
        text: Charge in Last Session
        unit_show: true
      - entity_id: select.myenergi_zappi_xxx_charge_mode
        text: Charge Mode
    Completed:
      - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
        text: Charge in Last Session
        unit_show: true
      - entity_id: select.myenergi_zappi_xxx_charge_mode
        text: Charge Mode
    Boosting:
      - entity_id: sensor.myenergi_zappi_xxx_charge_added_session
        text: Charge in Last Session
        unit_show: true
      - entity_id: sensor.myenergi_xxx_power_charging
        text: Charge Power Now
        unit_show: true
      - entity_id: select.myenergi_zappi_xxx_charge_mode
        text: Charge Mode

Toolbar not visible - style height on preview wrong

I could not see the toolbar even if the setting was true. I have seen that the toolbar is rendered into the dom. With browsers development tool I found the toolbar hidden under the next following card.

If i set height to auto in style class "preview", it works. I have seen that this setting is commented in style file already. Probably had some other issue with this.

Could you check the behaviour?

Regards,
Enrica

customize the stats

Can you please add an example to customize the stats....I don´t get it work.

Tesla custom integration configuration for charger-card

The Tesla Custom Integration v3 has gone through a bit of a rewrite, including some new naming schema for sensors. It now provides most of the necessary sensors to work with with the tmjo/charger-card and I have documented my configuration here, to assist others and maybe have this included as a template.

Note this accesses vehicle data/ controls via the Tesla cloud API and not the Tesla high powered wall connector (HPWC) wallbox.

image

type: custom:charger-card
entity: binary_sensor.duka_charger
customCardTheme: black
customImage: /local/tesla.png
details:
  name:
    entity_id: sensor.duka_vehicle_state_data
    attribute: vehicle_name
  location:
    entity_id: device_tracker.duka_location_tracker
  status:
    entity_id: binary_sensor.duka_charger
    attribute: charging_state
  substatus:
    entity_id: sensor.duka_charging
    attribute: charge_port_latch
  smartcharging:
    entity_id: binary_sensor.duka_charger
    attribute: fast_charger_type
  currentlimits:
    - 0
    - 1
    - 8
    - 16
  info_left:
    - entity_id: binary_sensor.duka_online
      attribute: state
  info_right:
    - entity_id: sensor.duka_battery
      icon: mdi:car-electric-outline
      unit: '%'
      unit_show: true
    - entity_id: sensor.duka_charger_power
      text: Power
      unit_show: true
      unit: kW
      icon: mdi:lightning-bolt
    - entity_id: sensor.duka_charger_power
      attribute: charger_volts
      text: voltage
      unit: V
      unit_show: true
      icon: mdi:sine-wave
    - entity_id: number.duka_charging_amps
      text: amp
      unit: A
      unit_show: true
      icon: mdi:current-ac
  stats:
    default:
      - entity_id: sensor.duka_charging_rate
        attribute: time_left
        text: remaining
        unit_show: true
        unit: hrs
      - entity_id: sensor.duka_energy_added
        text: Energy Added
        unit_show: true
        unit: kWh
      - entity_id: sensor.duka_charger_power
        attribute: charger_amps_request
        text: Request
        unit: A
        unit_show: true
      - entity_id: number.duka_charging_amps
        text: Actual
        unit: A
        unit_show: true
      - entity_id: switch.duka_charger
        text: Switch
  group2:
    - entity_id: sensor.duka_charging_rate
      attribute: charger_voltage
      text: voltage
      unit: V
      unit_show: true
    - entity_id: sensor.duka_charging_rate
      attribute: charger_amps_actual
      text: amp
      unit: A
      unit_show: true
    - entity_id: sensor.duka_charging_rate
      attribute: charger_power
      text: Power
      unit_show: true
      unit: kW
    - entity_id: sensor.duka_charging_rate
      attribute: charge_energy_added
      text: Energy Added
      unit_show: true
      unit: kWh
    - entity_id: sensor.duka_charging_rate
      attribute: charge_current_request
      text: Request
      unit: A
      unit_show: true
    - entity_id: sensor.duka_charging_rate
      attribute: charger_actual_current
      text: Actual
      unit: A
      unit_show: true
    - entity_id: switch.duka_charger
      text: Charger Switch
  toolbar_right:
    default:
      - service: script.tesla_charging_current_low
        text: Excess Solar Charging
        icon: mdi:solar-power
      - service: script.tesla_high
        text: 1A charging
        icon: mdi:numeric-1
      - service: script.tesla_16a
        text: 16A charging
        icon: mdi:numeric-9-plus

Add scalable image

Is your feature request related to a problem? Please describe.
Currently, the card displays a blue background with the image in the middle.

Describe the solution you'd like
Scale the image in such a way that the image covers the complete card, with all sensor data displayed on top of the image.

Describe alternatives you've considered

Additional context

Card not showing charger status since last update

Hi,

I saw the Breaking Change information, but I have changed the minimum config to the following (as per your guidance).

type: custom:charger-card
brand: easee
entity: sensor.husvegg_status
image: default

If you look at the screenshot below, there seem to be a lot of information missing which it is not pulling from the charger. However, I fully understand if I did not completely get what is needed to have it work like it did, do I need the full Advanced Config example to get the "missing_group" information to come up?

Screenshot_20221108_060510

update automation exempel

The Advanced example (Easee charger) is not working. After last easee update this automation dosent work.

Default Easee configuration just shows status

I have two Easee boxes with just a default configuration, e.g. sensor.*_status sensors etc. But the card is nearly empty

image

As soon as I use the full easee example (https://github.com/tmjo/charger-card#advanced-example-easee-charger) and find&replace CHARGERNAME by e.g. "vorne" and CHARGERID by it's id, it works..

I'm already enabled debugging but didn't get any meaningful apart from brand name is not detected within translation?

CHARGER-CARD 0.1.2 IS INSTALLED 
charger-card.js:3425 Translating 1 -> de: status.disconnected --> easee.status.disconnected --> Getrennt
charger-card.js:3425 Translating 1 -> de: click_for_group1 --> click_for_group1 --> undefined
charger-card.js:3428 Translating 2 -> de lowercase: click_for_group1 --> click_for_group1 --> undefined
charger-card.js:3432 Translating 3 -> en  : click_for_group1 --> click_for_group1 --> undefined
charger-card.js:3436 Translating 4 -> en lowercase: click_for_group1 --> click_for_group1 --> undefined
charger-card.js:3445 Gave up translating: click_for_group1 --> click_for_group1 --> click_for_group1

Current YAML configuration:

- type: 'custom:charger-card'
  entity: sensor.vorne_status
  brand: easee
  debug: true

Sensor reason for no current shows with underscores

Checklist:

  • [x ] I updated to the latest version available
  • [x ] I cleared the cache of my browser

Release with the issue:

Last working release (if known):

Browser and Operating System:

Description of problem:
Hello,
I don't know if there is something in my settings or a bug. I am using latest version of the card and latest version of HA. See below:

image

Javascript errors shown in the web inspector (if applicable):


Additional information:

Tried to add translation

@tmjo I tried to add a new Swedish translation to Charger Card. I can, however, not see any of the files or changes I committed. It probably is something I did/did not do. The language file is named sv-alt.json.

Does it show on your end?

Best regards, Niklas

Changing customImage based on charger status

Hello! I made custom pictures to match my Juicebox charger and I was wondering if there was a way to show a custom charger image based on the charger status instead of the show_leds option. (Just like the state_image on a picture element card) Thank you for the card!

Suggestion for improvement

  • cableLocked: It shows "off" when the cable is locked. It would be better if it would show "on" in this case.
  • The led's aren't blue if smart charging is on
  • The tooltip for DynamicCircuitLimit shows "Dyn Charger Limit"
  • Power should show one decimal

FR: Adapt to the Home Assistant theme instead of using custom themes

(Might be related to #1...)

Instead of using "hard coded" themes explicitly for this card I would like this card to be able to adapt to the standard/current Home Assistant theme.

It does not look particularly nice with my current theme. Especially the rounded vs. non-rounded edges.

I could manually set the theme colors to the same as my HASS theme. But as I've never ran into this issue with any other card I would assume that it's possible to make this happen automatically?

Some screenshots:

image
image
image
image

Config issues and different views on app and browser

Hi

I have issues configuration the card in both in the android app and using the web-interface. If I select the sensor and brand in the scroll list its not saved and I have to add it manually. Even if I select the brand (easee) I have to manually configure all the settings on the webinterface. If I use the android app I kind of get the opposite, the card is set up automatically but it only shows the default card even if I made some configurations.

These screenshots are from the same view, the first is from the android app and the other from the web interface on the computer, The upper card is manually configured (mainly based on the example but with some changes), the lower card has minimal configuration (brand and sensor).

Both will work fine, just strange that its different.
Android app:
Screenshot_20221118-094820_Home Assistant
Desktop:
Desktop

This is my setup
Home Assistant 2022.11.3
Supervisor 2022.10.2
Operating System 9.3
RPI4

Thanks for a great card!

Add support for ChargePoint chargers as a brand option

Is your feature request related to a problem? Please describe.
Please add support for ChargePoint chargers under the brand

Describe the solution you'd like
Configuring this card is onerous as it's unclear what entities go to which config points, it'd be great to have it support https://github.com/mbillow/ha-chargepoint for those of us with ChargePoint chargers

Describe alternatives you've considered
I've looked for example configurations for this particular charger brand and haven't found anything

Error on card - only when car is not connected

I have an easee home configured with the card filled with full template from the main instruction page.

When a car is connected by cable I have the stop, resume and override schedule icons at the bottom of the card.

But when the car is not connected i get an error instead of these 3 icons.

2022-05-24 11:07:36 ERROR (MainThread) [frontend.js.latest.202205041] http://homeassistant:8123/hacsfiles/charger-card/charger-card.js?hacstag=308752409011:7113:24 Uncaught TypeError: Cannot read properties of null (reading 'entity_id') and it shows a single (?) icon.

I'm completely new to home assistant - still finding my way around like an elephant in a porcelain store :-)

Include documentation for attributes used

I'm trying to use this card for my wallbox charger, but all of the sensors are separated instead of being a single one with lots of attributes. Can you provide an example of the sensor and it's attributes that you are using for this? That way I can create a template sensor that pulls in all of the other sensors into attributes.

Cannot configure card since update to v0.1.2

Hello,

Thanks for an amazing work with this card. It has been working flawlessly since it took it into use. However I just updated to v0.1.2 and cannot make the card work. I also tried in yaml but it doesn't work neither. The card is never populated with sensors.
Any ideas what is happening here? Using Easee charger.
I have a list of sensor and the brand further down pressing on those don't do anything:

image

And using yaml configuration doesn't help, all sensors are blank:
image

This was using this code:

      - type: custom:charger-card
        brand: easee
        image: default
        entity: sensor.driveway_status
        customCardTheme: theme_transp_white
        chargerImage: White

Charger card vanished..

I've been using this card with my Zappi charger for months but today the card is not showing up on MS Edge, iOS Safari and iOS HA app. It is still showing fine on my Android HA app though. I have been troubleshooting this for hours with no success.

Here is my yaml that has been working fine for months.
https://pastebin.com/6dQ7VtkS

go-e Charger

Good morning.
I really like the created card.
I would like to adapt the card to my go-e Charger myself, but I don't know if I can do it, I'm not that advanced yet.
Is it possible to include the go-e Charger in the list of devices?.
Documentation needed:
https://github.com/goecharger/go-eCharger-API-v2
https://github.com/syssi/homeassistant-goecharger-mqtt
The behavior of the LEDs is described in the user manual:
https://strapi-s3-bucket.s3.eu-central-1.amazonaws.com/20230613_go_e_Charger_Gemini_FLEX_INSTALLATION_AND_OPERATING_GUIDE_EN_WEB_V1_2_832adb73fc.pdf
Regards
tomik67

Help!

I had the stable release installed for a long time but never could make it work.
I just installed v0.1.1 pre-release and can't get it to work either. I've scrolled through all 896 of my sensors and managed to find Wallbox but can't configure the card past there using the visual editor...
image
image

Using code editor, I have this:
image
image

en-GB Translation

Just saw this changelog on the latest release:

Fix en-GB translation that was always present but not working (as opposed to regular en).

en-GB by virtue of being the original English (from England) literally is "regular en" and therefore all other "English" varieties are the deviants and not vice-versa.

Add support for OCPP based chargers

There is now a custom integration for chargers that support the Open Charge Point Protocol.

See ocpp, and this issue

I think this is the closest you can get to a universal interface towards the chargers. It should also be more responsive than a cloud based solution.

What would be needed to get ocpp working with the charger card?

Feature request

Thanks for this card. It looks great.I would really like that the color on the card changes with the current theme automatically like it does for many other cards.

Current limits not showing in list

Tried the new card and it works great! The only issue I have at the moment are that the current limits I have configured are not showing up correctly. When I click one of the settings for sending a current setting to the charger, the list is all white? The selections are there but the text is all white and the end of the list seems to disappears behind the details on the bottom of the charger card?

image

Error message in HomeAssictant Log: "Validation of translation placeholders for localized (de) string"

Checklist:

  • I updated to the latest version available
  • I cleared the cache of my browser

Description of problem:

Logger: homeassistant.helpers.translation
Quelle: helpers/translation.py:279
Erstmals aufgetreten: 12:50:57 (2 Vorkommnisse)
Zuletzt protokolliert: 12:50:57

Validation of translation placeholders for localized (de) string component.easee.device_automation.condition_type.error_pen_fault failed: (set() != {'entity_name'})
Validation of translation placeholders for localized (de) string component.easee.device_automation.trigger_type.error_pen_fault failed: (set() != {'entity_name'})

Screen Shot 2024-05-03 at 13 15 32 PM

Every time I boot the Home Assistant the Charger Card is causing those error messages. I do have the Home Assistant localication set to German (DE).

"click for limits"-options not showing

Thanks for e great card.

I use the standard card without any options set in the latest version.

When I click "Click for limits" the card expands, but no icons are showing where the card expands to be able to make the changes.

OpenEVSE defaults not working

When using brand set to openevse the card doesn't display any data except the charger status.
Card config:

type: custom:charger-card
entity: sensor.openevse_charging_status
brand: openevse

image

image

app-drawer-layout is no longer used in HA 2023.4

Checklist:

  • I updated to the latest version available
  • I cleared the cache of my browser

Release with the issue:
0.2.3
Last working release (if known):

Browser and Operating System:

Description of problem:

I must admit I did not see any difference, but many custom cards are in hell freezing over mode thanks to this:

app-drawer-layout was replaced by mwc-drawer. Thus the one instance of querySelector("app-drawer-layout partial-panel-resolver") in the release might need some fixing.

Javascript errors shown in the web inspector (if applicable):


Additional information:

"click for limits"-options display faulty

Card is working good, but the "click for limits" Option is faulty:

image

The options are displayed vertically but should be horizontal. Also, not all options are visible.

Session Energy doesn't show correct value

The correct value as shown in easee.cloud is 1.9kWh but the card shows 1937 kWh. It should probably show 1.937 kWh. However I it seems also the sensor itself doesn't show correct value. It shows 1.937 Wh no matter if I check or uncheck kWh to Wh checkbox in configuration. Also if the car is not connected shouldn't this be 0 ?
image
image
image

It is the same situation for Lifetime Energy.

Show basic schedule times

Is there a way to show the basic schedule on the card? I use this actively with powersaver.no to create a basic schedule and it would increase the WAF alot if I could show the start/end time on the card. Is that possible?

How to change the language

I would like to display the card in german language, but I don´t know how to do so.
HA-languange is german and region is germany.
Thank you for a hint.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.