Lovelace: Power wheel card

Upgraded to 0.116 on Pi3b and the powerwheel just dissapeared :thinking:

Update the card.

Thanks! That worked.

Thank you for your work! Really nice card! The option to set the card’s height would be great however. In my layout the card is located next to two mini graph cards, which are set to a fixed height. On my laptop the height of the three cards matches perfectly, but on my PC the power wheel card is slightly higher.

Anyone with a Tesla powewall want to share their config? Tried to get mine working but the values for consumption etc were wrong

I’d be interested in this too.

Hi,

just found this awesome card, and with my new solar panels I am eager to see EVERY data at the moment :slightly_smiling_face:

Looked easy for my straightforward case, but I am already stuck (and tried to comb through this like 3000 pages thread…). I have a Kostal Inverter (and according Hassio integration) that has tons of sensor data available, so everything needed for the power wheel is actually there.

Somehow, though, it’s not correctly considering the negative grid provisioning, but adds it rather to home consumption:

Maybe it would be good to optionally just accept a sensor for home consumption, and if given, don’t compute yourself. That would then correctly account for inverter consumption (which is currently ignored, though it’s not much anyhow).

Next, I am confused as of what the arrows show. E.g. in below screenshot, the home somehow feeds the panels, which of course never makes sense. At night, when the panels deliver nothing, I have two yellow bars towards grid and home, and a grey between grid and home. So it’s kind of totally messed up.

Also, the arrows never show share values, though docs say: “…values on the arrows are visible only when relevant. E.g. on a sunny day when part of your produced solar panel energy was returned to the grid and the other part was consumed by your home.”

In addition, I’ll get a battery the next days. So I tried that out also (is it still just Beta?). But the battery shows up connected to the grid (rather than home and panels), which never makes sense, as it’s never charged from or feeding to the grid. So for me, everything is kind of reversed from what I would expect it to be. But possibly I am all just doing it wrong?

Here is my simple yaml card configuration:

type: 'custom:power-wheel-card'
solar_power_entity: sensor.kostal_pv_power
grid_power_entity: sensor.kostal_power_grid

Thanks, habitoti

Hi habitoti,
Great to see a new user to the card. You’re almost there.

For the card, positive values of the grid sensor mean producing-to-the-grid. So negative values for the grid sensor, as in your screenshot, will be interpreted as consuming-from-the-grid. That’s why its value is added to the value of the solar panels. Please read the descriptions of the parameters in the readme file and also search for the word production_is_positive there, to find a solution for your issue.

Your config mentions the parameters for the power view only. If you want to see energy (and the example above), you have to supply parameters for the energy view too. In power view I believe there never are values at the arrows because they would show the same values as below the icons.

Version 0.1.5 is released. Small additions for styling via card-mod. This is the relevant part of the readme file:

More styling

You can use another custom integration card-mod to change more of the styling of power-wheel-card.
Don’t forget to install card-mod separately. Then you can put more styling to the classes and id’s in the power-wheel-card configuration.

Some classes to start with, are .icon (for the icons in the wheel) and .value (for the numeric values below the icons).
If you want to style icons and values of arrows and positions separately you want to use .arrow-icon (for the arrow icons), .position-icon (for the icons of the positions Home, Solar and Grid), .arrow-value and .position-value.

Here is an example where e.g. the values and the position icons (Home, Solar and Grid) in the card have been styled. The values have a larger font and are separated a bit more from the icons.
The position icons are larger. And there is more space in the bottom of the card.

- type: custom:power-wheel-card
  title: "Power wheel"
  solar_power_entity: sensor.YOUR_SOLAR_POWER_SENSOR
  grid_power_entity: sensor.YOUR_GRID_POWER_SENSOR
  style: |  # styled with card-mod
    .value {
      font-weight: 300;
      font-size: 20px;
      margin-top: 5px;
    }
    .position-icon {
      --mdc-icon-size: 56px;
    }
    .wheel {
      margin-bottom: 20px;
    }

Please have a look at card-mod. You can style cards with it.

Ah, I see. My bad. I saw that parameter earlier but didn’t bother as I was of the impression that the default would do it right, and later I forgot it :roll_eyes: my gut feeling was that a grid sensor would always deliver negative values for being fed, and so I just assumed that to be the default…works like a charme now!

Right: in Power view the targets are the split values already anyway – so all good.

1 Like

One more question, following up on a topic mentioned in my first question. This is what my Kostal inverter actually reports (and how it displays their WebUI power distribution chart):

As you can see, the sum of grid and PV is larger than home consumption, which is due to some additional inverter loss. I do have a sensor for the actual home consumption, so how about an option to provide that also in the configuration? If provided, you don’t need to compute any values, but rather show the three (or four, if battery exists) of them “as is”?

For now I created a virtual computed sensor for PV Power that kind of reverse engineers the net PV production from actual home consumption, grid and battery, and use that one as “Net PV Power”. So now the displayed home consumption is correct, but of course the shown solar production is reduced now by the inverter loss.

This is really not something dramatic (and I really LOVE this card!), but I was just wondering whether this wouldn’t in the end make things even simpler if actual values are provided and don’t even have to be computed in that case.

Hi Drew, did you get out with Enphase in Home Assistant? I also want to make a grid import and export sensor for the Tesla Consumption p
Power card.

Did anyone find a way to make this look so good?

Hello Thomas I would be really interested how you measure the NewMotion charging point as that is the one element I cannot measure in my home. Can you post how you did this on Github ? Thanks, Ruud

1 Like

I’ll try to post it on GitHub in the coming days. Once you have built it it is easy to connect it to the charger, it just requires a few wires and so far it seems to work fine. Every now and then I get a spike in the reading, probably because of the “hacky” way I do the decoding.

Thomas

1 Like

Hi Martin @MJPVDH - yes, got it working fine with Enphase

I have a couple of calculated power sensors from the Enphase Envoy that feed into the Power Wheel.

  • platform: template
    sensors:
    grid_power_consumption:
    friendly_name: Grid power consumption
    unit_of_measurement: ‘W’
    value_template: >
    {% if states(‘sensor.net_consumption_now’)|int > 0 %}
    {{ states(‘sensor.net_consumption_now’)|int }}
    {% else %}
    0
    {% endif %}

    grid_power_production:
    friendly_name: Grid power production
    unit_of_measurement: ‘W’
    value_template: >
    {% if states(‘sensor.net_consumption_now’)|int < 0 %}
    {{ (states(‘sensor.net_consumption_now’)|int|abs )}}
    {% else %}
    0
    {% endif %}

and my Power Wheel card config is like this:

      - type: "custom:power-wheel-card"
        title: Power Distribution
        solar_power_entity: sensor.envoy_current_energy_production
        solar_icon: mdi:solar-power
        grid_power_consumption_entity: sensor.importing
        grid_power_production_entity: sensor.exporting
        grid_icon: mdi:transmission-tower
        color_icons: true

apologies for being so late in my reply

Newbie question here.
I somehow have the grid and house reversed

My card is:

type: 'custom:power-wheel-card'
title_power: Power distribution
solar_power_entity: sensor.solar_power_w
grid_power_entity: sensor.total_power_shelly_em_w
production_is_positive: true

and the sensors are:

- platform: template
   sensors:
     solar_power_w:
       friendly_name: "ShellyEM Solar Power"
       value_template: "{{ states('sensor.shellyem_b03059_channel_2_power') }}"
       unit_of_measurement: "W"

 - platform: template
   sensors:
     total_power_shelly_em_w:
       friendly_name: "ShellyEM Total Power"
       value_template: "{{ states('sensor.shellyem_b03059_channel_1_power')|int + states('sensor.shellyem_b03059_channel_2_power')|int }}"
       unit_of_measurement: "W"

If I change production_is_positive to false then it adds grid and solar to house.

Any help would be appreciated.

No unfortunately. I began to commission a developer to do it for me, but it was too costly.

Hi
I’m a user who have PV, Electric Car and also a storage for my home. I’m using a battery add-on but I saw that if the battery is 100% full, and PV is giving energy to home and also to mains, in card I found simila to the battery is feeding mains. That’s not possible.
It’s possibile to write some rows to eliminate power from battery to mains?
Thank you