Lovelace: Power wheel card

Not sure why, but adding debug: true seems to have sorted it out. Removed it and it’s working. Now to work on the energy view. Seems a little more complex with my setup.

Looks like in 0.0.11 it’s no longer possible for me to revert the grid_icon color. :disappointed_relieved: , or my js fu is too bad.
I will stay at 0.0.10 :crossed_fingers:

You could try this code change, but I’m not sure the behavior will be exactly what you want:

this.data.grid = this._makePositionObject(-this.data.grid.val, this.config.grid_power_entity, this.config.grid_icon,
          'mdi:transmission-tower', this.config.power_decimals);

I added a minus - in line 397 just after the first parenthesis (. Don’t forget to increase the number in ?v=number to beat the cache monster.

Thanks for the fast reply and the code change.
Works for inverting the grid color.

No longer needed with the new custom_updater and the customcards endpoint.

1 Like

Version 0.0.12 has been released

Improvements

  • Replaced ES6 rest destructuring language constructs to support iOS10.3 on iPad4.
  • Added version number to the debug warning in the card, because not all browsers have a dev console.

Fixes

  • Added home_energy_entity to the registered sensors in debug info.

Hi everyone,

Can somebody explain what I’m doing wrong. Here’s the result of my Power View Card:

Untitled

So, solar power generated of 533 is correct. My house is consuming 454 - correct. The net amount of 79 is exported to the grid, correct. It’s the bottom that’s all wrong. The grid figure of 375 should be nil, with nothing going to the house. House should be 454 as that’s the total consumption. I can’t even work out where the figure of 375 is coming from.

My card is as follows:

type: 'custom:power-wheel-card'
solar_power_entity: sensor.emoncms_solar
grid_power_consumption_entity: sensor.emoncms_use
grid_power_production_entity: sensor.net_grid

sensor.emoncms_solar and sensor.emoncms_use are my two physical sensors that measure solar power produced and electricity consumed inside the house. For the calculation of import/export, my template sensor is as follows:

net_grid:
        friendly_name: "Electrcity Import"
        unit_of_measurement: 'W'
        value_template: " {{(states.sensor.emoncms_solar.state | float) - (states.sensor.emoncms_use.state | float)}}"     

I’m obviously doing something wrong and I’m sure it’s staring right in front of me, but alas, I can’t work it out.

Try to use the manual here in the GitHub repo. It’s more up-to-date than the first message in this topic of the forum. (EDIT: I updated the first message of this topic to the latest release).

If your house is consuming 454W than this value should be shown near the house icon, not near the arrow. If you are exporting net 79W to the grid, this value should be shown near the grid icon, not near the arrow.

If you don’t have separated grid power sensors for exporting and importing, then you can use grid_power_entity instead of grid_power_consumption_entity + grid_power_production_entity. Probably you can use

solar_power_entity: sensor.emoncms_solar
grid_power_entity: sensor.net_grid

if I understand your situation correctly.

You did, that got it exactly as needed. Thanks very much for your help and the great card.

1 Like

image
what is wrong here the values are right but the arrows are wrong
how do i fix this ?

Hi Tarbax. Before I can help you, I need a bit more information. Maybe you could file an issue here. The template will help you in supplying the extra information. Could you also explain there why you think the numbers are correct?

Because I compare it with my grafana results and directly from the source.
At lower consumption it is working like it should:

I guess that you encounter an issue because your input sensors deliver values for different time frames or at different moments. Could happen e.g. if your solar power sensor supplies a new value every minute and your grid power sensor(s) supply a new value every 12 seconds. Then the values on your card are off for 48 seconds each minute.

Hope this helps. If you want to go beyond the point of guessing: please use the issue form to supply all requested information that helps me diving into it and solve your issue.

I’ve started using this again now that it works better with my setup. There are 2 things that are bugging me.

  1. On the energy view, is it possible to hide the value under the grid icon? For me this is useless and is the difference between what I export and what I’ve used. So if I’ve exported 10kWh, and used 7kWh, it will show 3kWh. This is totally useless and pointless to me.

  2. On the money view, is it possible to have different rates for importing and exporting power? I pay 24.22cents per kWh used and earn 12.7cents per kWh I send back to the grid.

Thanks. :slight_smile:

Thanks for your feature requests.

< :wink: > O, no, that could be the most important value on the card. It’s our footprint on earth. It’s the net energy we consume. It’s the number we should all decrease. You almost make me want to implement a blinking value here. < / :wink: > But, no kidding, I don’t want to hide this value, because adding up these values is exactly what the card is meant for.

Yeah. That’s a good one. But then I have to solve a design question first. Let’s say you have energy values E1, E2 and E3 like in the image:
Home_Assistant%202
And you have ‘cp’ for the prize you earn for producing to the grid (exporting). And you have cc for the prize you pay for consuming from the grid (importing).

Then the question: how would one value the part of the solar energy that’s directly consumed in ones house (and not exported to the grid), the c... in the image. Should it be cc or cp?
Home_Assistant

Should it be cc because that’s the prize you otherwise had to pay for it when you didn’t have solar panels or when there wasn’t enough sun?

  1. ok. That makes sense. Never looked at it like that before.

  2. Personally I’d like to see the solar that’s consumed by the house to have the same value as what I’d otherwise pay if from the grid. That way I’d see how much I’ve saved. So it should be cp.

i have the sensors now polling from emoncms so it should be updating all at the same time.
but still i have:
image
probably the problem of the 1W difference?

Update:
test my theory but still:
image

Update 2:

Hi. You must have missed one of the requirements for the power view for the solar sensor: The sensor state value should be a positive number when producing power. I think yours has a negative value when producing power (-2221.17W). Are you familiar with creating template sensors? You could make an extra sensor by e.g.:

sensor:
  solar_power:
    friendly_name: Solar power
    unit_of_measurement: 'Watt'
    value_template: >-
      {{ 0 - states('sensor.emoncms2_solar') | float }}

Then you can use this sensor instead of the emoncms2_solar as input for the card.

Same for your grid_production sensor. The requirements are here if you want to read them again.

I hope you made a typo there. Based on your explanation, it think you meant cc: the rate you otherwise should have payed for importing/consuming the energy from the grid.

But I like your explanation and have put it in the 0.0.13-dev version. Maybe you can check it out on the dev branch and use the new card parameters energy_consumption_rate (‘import’ in your words) and energy_production_rate (‘export’ in your words). Please look into the readme of the dev branch to see further explanation. You can search for the word rate.

haha, yep. my bad.

Just looked at the 0.0.13-dev. Seems to work very well. Lines up almost perfectly with the rates I have on pvoutput.org. The only difference is that I have a daily supply charge that your card doesn’t take into account. Other than that, this is perfect.