Lovelace: Power wheel card

Very cool, but have a question. How did you install the Youless to measure your solar power generation? Do I also need the YL03 (or YL04 in my case) next to the LS120 for that? I have an DSRM Smart power meter, but that only shows the nett. power usage (generation - usage).

Great that you found out where your ‘magic’ was coming from. :smiley:
For next release the order of where the icons come from will be:

  1. The icon set in the card option
  2. If not, then the customized icon
  3. If not, then the default icon

You are so right. I did have that in mind when choosing the name. But the current implementation is more like a power-pyramid-card instead of a power-wheel-card. :smiley: :smiley: But as soon as I get my CSS skills on next level, I’d love to work on that.

Okay, what about a number_of_decimals as a card option for next release? Then @Mariusthvdb can choose his 2 decimals and @meizenga can choose his 3 decimals.

@iMartien, my Youless setup is of 2012, but still works great:


I just cut the powerline somewhere between inverter and fuse box and put an ordinary current meter in between. In fact if I check the youless site now, it looks like I ordered both components from them. The casing was from a different site, which I don’t remember.
In 2012 this was about the only (cheapest) solution, but maybe someone else can argue that for your 2018 situation.

For configuration:

sensor:
- platform: rest
  name: Youless
  resource: http://YOUR_YOULESS_IP_HERE/a?f=j
  json_attributes:
  - cnt
  - pwr

and then the {{ states.sensor.youless.attributes.pwr }} value (see first post of this topic) will be set.

@Klagio, since I use the setup with the Youless, the model/brand of the inverter wasn’t relevant to me any more. I hope nowadays some inverters have better integrations with LAN than back in 2012. :wink:

1 Like

lol. what I don’t understand is where all the decimals are coming from, since my own 2 sensors are rounded sensor:

##########################################################################################
# Zonnepanelen
##########################################################################################
- platform: mqtt
  state_topic: 'mac/energy-solar-sdm630-modbus/id/solar'
  name: 'ZP actuele opbrengst'
  unit_of_measurement: 'Watt'
  value_template: '{{ value | round(2) }}'

##########################################################################################
# Slimme Meter DSMR4
##########################################################################################

- platform: mqtt
  state_topic: 'mac/energy-dsmr4/id/usage'
  name: 'Netto verbruik'
  unit_of_measurement: 'Watt'
  value_template: '{{ value | round(2) }}'

There is some calculation going on and the result is converted into a string. Maybe that’s causing it. Anyway, the added option for decimals is on the dev branch now. :partying_face:

You could add

  decimals: 2

if you like.

If you are open to any feature requests I thought red/amber/green colours for the arrows would be good based on if you’re drawing from the grid. And cost on the arrows too if you know your unit cost for resell and buy :slight_smile:

yep, have a look at post 15 in this thread… would be nice indeed.

First of all, great card!

How does the card deal with sensors that are not updated at the same time? My solar power sensor is only updated every 5 minutes, while my grid power sensor is updated ever 5 seconds or so. This results in strange numbers in the card. E.g. my solar power is 196 W (average over 5 minutes), while my DSMR meter is showing power put into the grid of more than 1000 W (average over 5 seconds). This will result in negative values. Of course, one option is to create a sensor that calculates the average over time corresponding to the slowest sensor, I guess.

image

Nice feature requests. Amazing what you all come up with. :slight_smile:

A note to all future feature requesters: I want to keep the card as simple and clean as possible. Possibly even simpler and cleaner than now, with big round arrows to make it a circle. Not showing every value there is and clutter the interface with it. There are solutions for that in alternating the shown values or keep it configurable, etc.
For the costs thing: I certainly want to extend the card with it, but costs are related to energy (kWh), not to power (W), so I have to implement something for the energy first and then do costs. And keep it as simple as now. Haha.

@jstride For the coloring it’s better indeed to color the arrows and not the icons, but red/amber/green doesn’t match with all themes. But then again, it can be a card option to choose theme colored arrows or choose red/green. :wink: Not sure when you want to see amber though, because drawing from the grid would be red? And producing to the grid is green?

@Ernst Thx for the compliment. I don’t have a solution right away for your timing issue. Adding the numbers for power values that are measured on different times or averaged on different time frames is indeed giving wrong values. I should put something in the requirements/instructions for that. Maybe you could figure out if you can make sensors for energy-spent-today-till-now (in kWh) based on meter counters. Then the values would still add up to meaningful values (in kWh).

Thanks @gurbyz - I was thinking amber when solar > grid and red grid > solar and then green when grid == 0

This is great. A few little hiccups on my part, but for the most part, it works great.

One suggestion if possible, can we define our own consumption sensor? I find that sometimes it’s off a little with what my actual consumption is. Maybe this can be an optional setting. If set, then use the sensor, if not set then use the maths to work it out.

Something like what Tesla has in their app. It also has battery info which might be a good option later on to add to this. I was going to look into doing something like this in the future, but you’ve beat me to it.

Great idea @cjsimmons to also have the card parameter for home_power_sensor and leaving it optional. Will implement that soon.

Awesome app, that one of Tesla! I got my UPS yesterday and wasn’t even aware of that it should also be part of the picture. Of course, optional, because not everyone has a powerwall or UPS. :slight_smile:

1 Like

Becareful, solar panels consumme energy even if they dont produce (due to power inverter). So calculation could vary a little.

All optional would be great.
If you have the sensors for PV, house, grid and battery already in HA, only the arrows have to be calculated.
Here’s a screenshot from my system, maybe for some ideas.
Auswahl_010

2 Likes

Available on the (unstable) dev branch now:

  • Added solar_power_icon and grid_power_icon as card parameters.
  • Added decimals as card parameter to display the power values in this number of decimals.
  • Added home_power_entity as optional card parameter in case you already have a sensor for it.
1 Like

The new home_power_entity option works well. No more inconsistencies with my setup.

The other options all work great too.

1 Like

Version 0.0.2 has been released yesterday

  • Added solar_power_icon and grid_power_icon as optional card parameters.
  • Added decimals as optional card parameter to display the power values in this number of decimals.
  • Added home_power_entity as optional card parameter in case you already have a sensor for it and want to use it, instead of letting the card calculate the value of it.

Version 0.0.3 is under construction on the dev branch. Changes so far:

  • Click to open more-info modals.
  • Performance. Moved some code to run it only after config changes.

HI @gurbyz

please consider creating a json fie to enable custom card updater to track your card for updates?

It would make your card appear in this list automatically:

second: and forgive me if I have missed this earlier, but it would be really nice if the current setup could provide an icon_color for grid consumption (orange) and production (green). Or, alternatvily, have it rely on available customization already existing. I have this for my regular setup:

sensor.netto_verbruik:
#  icon: mdi:flash-outline
  templates:
    icon: >
      if (state > 0) return 'mdi:import';
      return 'mdi:export';
    theme: >
      if (state > 0) return 'orange';
      return 'green';

but the color isn’t inherited, the icon does change accordingly.

if you would be willing to do so, please let me ask to do that based on the current calculations you do in the module, and not on the sensor values directly. Ill explain:

In my setup grid is negative when producing more power than the house needs:

35

as you see, the production arrow is correctly lit in yellow.

3 Likes

Nice card. I had to make an extra sensor to make it positive. In my inverter portal the wheel shows the grid consumption power is displayed as negative. This is SOLAX

image

4 Likes