Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: House bubble - more than 1 color/source #165

Open
mkanet opened this issue Oct 30, 2023 · 0 comments
Open

Feature Request: House bubble - more than 1 color/source #165

mkanet opened this issue Oct 30, 2023 · 0 comments

Comments

@mkanet
Copy link

mkanet commented Oct 30, 2023

Currently, the house bubble flow only shows the color of the highest flow.

Is it possible to change the house bubble to visualize percentages of each source (in respect to each other) just like the Home Assistant's Energy Dashboard house bubble?

image

It could use the templates below to calculate the percentage of each piece of the bubble above.

template:
  - sensor:
    - name: 'Solar Power Percentage'
    unit_of_measurement: '%'
    state: >
      {% set total = states('sensor.powerwall_solar_export')|float + states('sensor.powerwall_site_import')|float + states('sensor.powerwall_battery_import')|float %}
      {{ ((states('sensor.powerwall_solar_export')|float / total) * 100)|round(2) if total > 0 else 0 }}
    - name: 'Grid Power Percentage'
    unit_of_measurement: '%'
    state: >
      {% set total = states('sensor.powerwall_solar_export')|float + states('sensor.powerwall_site_import')|float + states('sensor.powerwall_battery_import')|float %}
      {{ ((states('sensor.powerwall_site_import')|float / total) * 100)|round(2) if total > 0 else 0 }}
    - name: 'Battery Power Percentage'
    unit_of_measurement: '%'
    state: >
      {% set total = states('sensor.powerwall_solar_export')|float + states('sensor.powerwall_site_import')|float + states('sensor.powerwall_battery_import')|float %}
      {{ ((states('sensor.powerwall_battery_import')|float / total) * 100)|round(2) if total > 0 else 0 }}
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant