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

Graphic looks strange #162

Open w1Ngx opened 1 year ago

w1Ngx commented 1 year ago

Hi,

I successfully configured the input sources for the dashboard and the values match my solaredge app. Now when I look at the card, it somehow looks off. Is there a way to fix this?

Screenshot 2023-10-03 162758

Thanks a lot for the great work!

pohly commented 11 months ago

Note that https://github.com/thomasloven/lovelace-card-mod needs to be installed for that, for example via HACS. I did that, but I am unsure where I should place that snippet.

I tried both at the end and in the view, but neither of these worked. For reference:

views:
  - title: Home
    type: custom:tesla-style-solar-power-card
    name: Stromfluss
    grid_to_house_entity: sensor.flow_grid_to_house
    grid_to_battery_entity: sensor.flow_grid_to_battery
    ...
    appliance1_extra_entity: switch.keller_plug
    card_mod:
      style: |
        ha-card {
          zoom: 1.5 !important;
        }
title: Stromfluss
pohly commented 11 months ago

@mkanet: as you had this working, can you clarify where to put that card_mod snippet?

mkanet commented 11 months ago

@mkanet: as you had this working, can you clarify where to put that card_mod snippet?

This is what it would look like:

type: custom:tesla-style-solar-power-card
grid_entity: sensor.apf_grid_entity
grid_extra_entity: sensor.pge_electric_cost_to_date
house_entity: sensor.apf_real_house_load
generation_entity: sensor.apf_generation_entity
battery_entity: sensor.apf_battery_entity
grid_to_house_entity: sensor.apf_grid2house
grid_to_battery_entity: sensor.apf_grid2batt
generation_to_grid_entity: sensor.apf_solar2grid
generation_to_battery_entity: sensor.apf_solar2batt
generation_to_house_entity: sensor.apf_solar2house
battery_to_house_entity: sensor.apf_batt2house
battery_to_grid_entity: sensor.apf_batt2grid
battery_extra_entity: sensor.powerwall_charge
change_house_bubble_color_with_flow: 1
hide_inactive_lines: 1
speed_factor: 0.05
show_gap: true
card_mod:
  style: |
    ha-card {
      zoom: 1.5 !important;
    }
pohly commented 11 months ago

Solved: when the zoom factor is too high, some other mechanism kicks in and scales back. With zoom: 1.1 I got a slightly larger card.

valimaties commented 6 months ago

There must do something with icons size and text position and size, because if it is a good view in web, there is worng in mobile, and vice-versa. However, the zoom factor does not work good. It must be done somehow in other way. And more than that, the icon end text must have a gap between them, always. The icon seems to be centering every time and text is bellow icon, which will make the text going too down.

image

mkanet commented 6 months ago

@valimaties you might consider switching to https://github.com/flixlix/power-flow-card-plus it doesn't have this weird display issue.