reptilex / tesla-style-solar-power-card

Home assistant power card mimicking the one tesla provides for the powerwall app.
221 stars 59 forks source link

Add three additional appliances #82

Open fhopley opened 3 years ago

fhopley commented 3 years ago

This card is extremely useful for understanding your current power generation / sources. It could be made more useful to understand your current power loads by adding support for additional appliances.

  1. Please see attached picture as an example of how 3 additional appliances could be added to the card.

  2. Another extension / possibility would be to allow the final additional appliance (either in the current card, or better yet the new version with the 3 additional appliances) to dynamically update to show the additional appliance with the largest current power usage. That is, the user defines a few additional appliances, most of which are not visible on the card at all ... unless they happen to be drawing the most power and then that appliance becomes visible (and replaces whatever is showing in the final appliance spot by default).

Design fiction
tigers75 commented 3 years ago

I second this: I think it's a very useful option for many of us. For instance I have a car charger and a heatpump that are the 2 main energy drawing appliances that I'd like to show at a glance, but then there're others like dishwasher, washing machine, etc. that I'd like to show too. As an alternative we could just have a third one that displays the other appliance that's drawing more power in that particular moment (or build a sensor that's the sum of all of them). In all of these scenarios a third appliance would be a much needed option.

AviadorLP commented 2 years ago

Yes this is what i was looking for also. i second this also, i wrote a template for wils106 solax integration via modbus to be able to use this card, since it didn't have the entities for flow. This card is perfect, just missing additional appliances at the very least 3 more. and the idea of replacing the first 2 with the highest consuming appliance of a list of entities is also a very good idea! But i guess almost anyone can create a template for a new entity that uses the highest power from a list and use that new entity here. You gave me a great idea, fhopley. going to write a sensor template for that and use the extra entity sensor info for a short name of the appliance in use. thanks.

AviadorLP commented 2 years ago

Ok done a full template, just replace the sensors below with your favorite ones.

sensor:
  - platform: min_max
    name: Highest Power Appliance
    type: max 
    entity_ids:
      - sensor.shelly_lights_power
      - sensor.recirculacao_de_agua_power
      - sensor.maquina_de_lavar_roupa_power
      - sensor.maquina_de_secar_roupa_power
      - sensor.termoacumulador_power
# replace with what you need at least 2 entities required and also 
# in Highest Power Appliance Short Name if you want or Unknown will be shown

template:
- sensor:
  - name: Highest Power Appliance Short Name
    state: >
      {% if is_state_attr('sensor.highest_power_appliance', 'max_entity_id', 'sensor.shelly_lights_power') %}
        Lights
      {% elif is_state_attr('sensor.highest_power_appliance', 'max_entity_id', 'sensor.recirculacao_de_agua_power') %}
        Water
      {% elif is_state_attr('sensor.highest_power_appliance', 'max_entity_id', 'sensor.maquina_de_lavar_roupa_power') %}
        Washing
      {% elif is_state_attr('sensor.highest_power_appliance', 'max_entity_id', 'sensor.maquina_de_secar_roupa_power') %}
        Drying
      {% elif is_state_attr('sensor.highest_power_appliance', 'max_entity_id', 'sensor.termoacumulador_power') %}
        Termo
      {% else %}
        Unknown
      {% endif %}

and insert in custom chart

appliance1_consumption_entity: sensor.highest_power_appliance
appliance1_extra_entity: sensor.highest_power_appliance_short_name
appliance1_icon: mdi:flash
AviadorLP commented 2 years ago

The result will be this:

Clipboard04

Thanks again for the ideia fhopley.

reptilex commented 2 years ago

I'd love to implement this, will be trying but it always takes so long to do anything with the rendering that I would not get my hopes up just yet.

ziptbm commented 2 years ago

@reptilex - I think my other thread regarding where to track inport/export power would be better classified as simply thinking about more bubble options for additional data in the card. In this response in this linked thread, I was suggesting adding bubbles above and below the grid bubble, which would add more without changing the size of the card itself if they're used. Appreciate your response earlier and consideration. This is my most used card in Home Assistant!

@fhopley +1 to this!

fhopley commented 2 years ago

@AviadorLP Thanks for writing up a template for selecting the device with the highest power. I'd also like to change the appliance1_icon ... any thoughts on how that could be done? A silly thing I tried was using a text helper and putting the text of the mdi:icon in it - but that doesn't work. Thanks.

tigers75 commented 2 years ago

I did this:

AviadorLP commented 2 years ago

@AviadorLP Thanks for writing up a template for selecting the device with the highest power. I'd also like to change the appliance1_icon ... any thoughts on how that could be done? A silly thing I tried was using a text helper and putting the text of the mdi:icon in it - but that doesn't work. Thanks.

I wanted the same thing and I tried many things. could not find a way to make it work so i decided for the flash icon. I dont think its possible to have a changing icon in this custom chart. Sorry. I believe it will only be possible if reptilex changes the icon implementation.