Giter VIP home page Giter VIP logo

power-flow-card-plus's Introduction

Power Flow Card Plus

ko-fi support hacs_badge GitHub total downloads commit_activity GitHub release (latest by date)

2023-03-26-13-04-07

Tip

Version 0.2.0 is out now! ✨ Check out the new features!

Additional Features / Enhancements

  • UI Editor!!! 🥳
  • Multiple Language support (🇺🇸, 🇩🇪, 🇵🇹, 🇪🇸, 🇧🇷, 🇳🇱, 🇮🇹, 🇫🇷, 🇷🇺, 🇫🇮, 🇵🇱, 🇩🇰, 🇸🇰, 🇨🇿)
  • Bidirectional Individual Entities ↕️
  • Secondary Information for all circles ℹ️
  • Display Grid Power Outage ⚡️
  • Template functionality 📙
... and More:
  • Option for card full size
  • Add Grid Tolerance for small values, to not display the battery correcting grid values
  • New and improved Flow Rate Model
  • Choose wether or not to color icons, text, etc.
  • Display Individual power entities
  • Customize Individual entities's label, icon and color
  • Configure wether to hide Individual Entity when state is 0 or unavailable
  • Clickable entities (including home)
  • Fixed crooked lines
  • Have curved lines connect to the Circles
  • Keep color of battery to grid line, even when not returning
  • Display Low Carbon Energy from the grid
  • Customize Low Carbon Energy label, icon, circle color, icon color and state type
  • Customize Battery, Solar and Home's color, icon, color of icon and label

Goal

The Goal of this card is to provide an easy to understand and visualize way of displaying the current Power Distribution coming from and to different sources, such as solar, grid, home batteries etc. Furthermore, this card aims to expose a lot of customizability and control of its behavior to the configuration, allowing users to tailor it to their specific requirements.

Scope

This card does not aim to display Energy Values (Meaning accumulated power over 1 day, for example). If this is your goal, check out the Energy Flow Card Plus.

Installation

HACS (recommended)

This card is directly available through HACS. To install HACS, follow these instructions. After having HACS installed, simply search for "Power Flow Card Plus" and download it using the UI 🙂

Manual install
  1. Download and copy power-flow-card-plus.js from the latest release into your config/www directory.

  2. Add the resource reference as decribed below.

Add resource reference

If you configure Dashboards via YAML, add a reference to power-flow-card-plus.js inside your configuration.yaml:

resources:
  - url: /local/power-flow-card-plus.js
    type: module

Else, if you prefer the graphical editor, use the menu to add the resource:

  1. Make sure, advanced mode is enabled in your user profile (click on your user name to get there)
  2. Navigate to Settings -> Dashboards
  3. Click three dot icon
  4. Select Resources
  5. Hit (+ ADD RESOURCE) icon
  6. Enter URL /local/power-flow-card-plus.js and select type "JavaScript Module". (Use /hacsfiles/power-flow-card-plus/power-flow-card-plus.js and select "JavaScript Module" for HACS install if HACS didn't do it already)

Usage

Warning

This card offers a LOT of configuration options. Don't worry, if you want your card's appearance to match the oficial Energy Flow Card, you will only need to setup the entities. The rest of the options only enable further customization. If this is your goal, please go to Minimal Configuration

Options

Card options

Name Type Default Description
type string required custom:power-flow-card-plus.
entities object required One or more sensor entities, see entities object for additional entity options.
title string Shows a title at the top of the card.
dashboard_link string Shows a link to an Energy Dashboard. Should be a url path to location of your choice. If you wanted to link to the built-in dashboard you would enter /energy for example.
dashboard_link_label string Go To Energy Dashboard (auto-translates) If set, overrides the default link label to go to a different dashboard.
second_dashboard_link string Shows another link to an Energy Dashboard. Should be a url path to location of your choice. If you wanted to link to the built-in dashboard you would enter /energy for example. (Only available in the YAML Editor)
second_dashboard_link_label string Go To Energy Dashboard (auto-translates) If set, overrides the second default link label to go to a different dashboard.
kw_decimals number 1 Number of decimals rounded to when kilowatts are displayed.
w_decimals number 1 Number of decimals rounded to when watts are displayed.
min_flow_rate number .75 Represents how much time it takes for the quickest dot to travel from one end to the other in seconds.
max_flow_rate number 6 Represents how much time it takes for the slowest dot to travel from one end to the other in seconds.
watt_threshold number 0 The number of watts to display before converting to and displaying kilowatts. Setting of 0 will always display in kilowatts.
clickable_entities boolean false If true, clicking on the entity will open the entity's more info dialog.
min_expected_power number 0.01 Represents the minimum amount of power (in Watts) expected to flow through the system at a given moment. Only used in the New Flow Formula.
max_expected_power number 2000 Represents the maximum amount of power (in Watts) expected to flow through the system at a given moment. Only used in the New Flow Formula.
display_zero_lines object {mode: "show"} Check Display Zero Lines
full_size boolean false Warning: This option is experimental. To use this option, you must set your view to panel mode. If set to true, the card will take up the full height of the screen. And the Card should go to the center of the screen.
style_ha_card css CSS Styling to apply to the container of the card (border and background of the card).
style_card_content css CSS Styling to apply to the content of the card (all circles and lines of the card).
use_new_flow_rate_model boolean false If set to true, the card will use the New Flow Formula.

Entities object

At least one of grid, battery, or solar is required. All entites (except battery_charge) should have a unit_of_measurement attribute of W(watts) or kW(kilowatts).

Name Type Description
grid object Check Grid Configuration for more information.
solar object Check Solar Configuration for more information.
battery object Check Battery Configuration for more information.
individual array Check Individual Devices for more information.
home object Check Home Configuration for more information.
fossil_fuel_percentage object Check Fossil Fuel Percentage for more information.

Grid Configuration

Name Type Default Description
entity string or object undefined required Entity ID of a sensor supporting a single state with negative values for production and positive values for consumption or an object for split entites. Examples of both can be found below.
name string Grid If you don't populate this option, the label will continue to update based on the language selected.
icon string mdi:transmission-tower Icon path for the icon inside the Grid Circle.
color object Check Color Objects for more information.
color_icon boolean or "production" or "consumption" false If set to true, icon color will match the highest value. If set to production, icon color will match the production. If set to consumption, icon color will match the consumption.
display_state "two_way" or "one_way" or "one_way_no_zero" two_way If set to two_way the production will always be shown simultaneously, no matter the state. If set to one_way only the direction that is active will be shown (since this card only shows instantaneous power, there will be no overlaps ✅). If set to one_way_no_zero the behavior will be the same as one_way but you will still the consumption direction when every state is 0.
color_circle boolean or "production" or "consumption" false If set to true, the color of the grid circle changes depending on if you are consuming from the grid or returning to it. If set to production, circle color will match the production. If set to consumption, circle color will match the consumption. If set to false, circle color will match the consumption.
secondary_info object undefined Check Secondary Info Object
display_zero_tolerance number 0 If the state of the entity is less than this number, it will be considered zero. This is to avoid having the grid circle show a small amount of consumption when the battery is trying to correct itself to the grid.
power_outage object undefined Configure how the card handles a power outage. Check Power Outage for more info.
color_value boolean Default is true. If set to false, the values of power will not be colored according to input and output.
invert_state boolean false If set to true the direction as well as the values will be inverted, meaning a positive value will be shown as production and a negative value will be shown as consumption.

Solar Configuration

Name Type Default Description
entity string undefined required Entity ID providing a state with the value of solar production.
name string Solar Label for the solar option. If you don't populate this option, the label will continue to update based on the language selected.
icon string mdi:solar-power Icon path for the icon inside the Solar Circle.
color string HEX value of the color for circles labels and lines of solar production.
color_icon boolean false If set to true, icon color will match the circle's color. If set to false, icon color will match the text's color.
color_value boolean false If set to true, text color of the state will match the circle's color. If set to false, text color of the state will be your primary text color.
secondary_info object undefined Check Secondary Info Object
display_zero_state boolean true If set to true, the state will be shown even if it is 0. If set to false, the state will be hidden if it is 0.
invert_state boolean false If set to true the direction as well as the values will be inverted, meaning a negative value will be shown as production and a negative value will be shown as 0.

Battery Configuration

Name Type Default Description
entity string or object undefined required Entity ID of a sensor supporting a single state with negative values for production and positive values for consumption or an object for split entities. Examples of both can be found below.
state_of_charge string undefined required Entity ID providing a state with the state of charge of the battery in percent (state of 100 for a full battery).
state_of_charge_unit string % Unit of the state of charge.
state_of_charge_unit_white_space boolean true If set to false, the unit of the state of charge will not have a white space in front of it.
state_of_charge_decimals number 0 Number of decimals to show for the state of charge.
name string Battery Label for the battery option. If you don't populate this option, the label will continue to update based on the language selected.
icon string mdi:battery or dynamic based on state of the battery Icon path for the icon inside the Battery Circle.
color object Check Color Objects for more information.
color_icon boolean or "production" or "consumption" false If set to true, icon color will match the highest value. If set to production, icon color will match the production. If set to consumption, icon color will match the consumption.
display_state "two_way" or "one_way" or "one_way_no_zero" two_way If set to two_way the production will always be shown simultaneously, no matter the state. If set to one_way only the direction that is active will be shown (since this card only shows instantaneous power, there will be no overlaps ✅). If set to one_way_no_zero the behavior will be the same as one_way but you will still the consumption direction when every state is 0.
state_of_charge_unit_white_space boolean true If set to false, there will be no white space between the state of charge and the unit of the state of charge.
color_state_of_charge_value boolean or "production" or "consumption" false If set to true, state of charge text color will match the highest value. If set to production, state of charge text color will match the production. If set to consumption, state of charge text color will match the consumption.
color_circle boolean or "production" or "consumption" true If set to true, circle color will match the highest value. If set to production, circle color will match the production. If set to consumption, circle text color will match the consumption.
color_value boolean true If set to false, the values of power will not be colored according to input and output.
invert_state boolean false If set to true the direction as well as the values will be inverted, meaning a positive value will be shown as production and a negative value will be shown as consumption.

Individual Configuration

The Individual fields must be an array of objects. Each object must follow the following structure:

Name Type Default Description
entity string undefined required Entity ID providing a state with the value of an individual consumption.
name string Car or Motorcycle Label for the individual device option. If you don't populate this option, the label will continue to update based on the language selected.
icon string mdi:car-electric or mdi:motorbike-electric Icon path for the icon inside the Individual Device Circle.
color string #d0cc5b or #964cb5 HEX value of the color for circles labels and lines of the individual device.
color_icon boolean false If set to true, icon color will match the circle's color. If set to false, icon color will match the text's color.
unit_of_measurement string Wor kW (dynamic) Sets the unit of measurement to show in the corresponding circle
inverted_animation boolean false If set to true, the small dots will flow in the opposite direction.
secondary_info object undefined Check Secondary Info Object. The secondary_info entity can provide a number or a string (eg: EV State charging and discharging).
display_zero boolean false If set to true, the device will be displayed even if the entity state is 0 or not a number (eg: unavailable). Otherwise, the non-fossil section will be hidden.
display_zero_tolerance number 0 If set, the device will be displayed if the state is greater than the tolerance set (This is also available for the secondary info). No need to set display_zero property to true.
display_zero_state boolean true If set to true, the state will be shown even if it is 0. If set to false, the state will be hidden if it is 0.
color_value boolean false If set to true, state text color will match the circle's color. If set to false, state text color will be the primary text color.
decimals number 0 Number of decimals to show in the corresponding state.

Home Configuration

Name Type Default Description
entity string undefined required Entity ID providing a state with the value of your home's consumption. Note that this entity will not be displayed and will only be used for the more info dialog when clicking the home section.
name string Home Label for the home option. If you don't populate this option, the label will continue to update based on the language selected.
icon string mdi:home Icon path for the icon inside the Home Circle.
color_icon boolean or "solar" or "grid" or "battery" false If set to true, icon color will match the highest value. If set to solar, icon color will match the color of solar. If set to grid, icon color will match the color of the grid consumption. If set to battery, icon color will match the color of the battery consumption.
color_value boolean or "solar" or "grid" or "battery" false If set to true, state text color will match the highest value. If set to solar, state text color will match the color of solar. If set to grid, state text color will match the color of the grid consumption. If set to battery, state text color will match the color of the battery consumption.
secondary_info object undefined Check Secondary Info Object
subtract_individual boolean false If set to true, the home consumption will be calculated by subtracting the sum of the individual devices from the home consumption.
override_state boolean false If set to true, the home consumption will be the state of the entity provided. By default the home consumption is caluclated by adding up all sources. This is useful, when for example you are using an inverter and it has power losses.

Fossil Fuel Configuration

Name Type Default Description
entity string none required Entity ID providing a state with the value of the percentage of fossil fuel consumption. The state should be 100 when all the energy from the grid comes from high emission sources and 0 when all the energy from the grid comes from low emission sources. It is recommended to use the CO2 Signal integration, which provides this sensor out of the box without any additional templating. This will also be the entity used in the more-info dialogs.
name string Low-carbon Name to appear as a label on top of the circle.
icon string mdi:leaf Icon path (eg: mdi:home) to display inside the circle of the device.
color string #0f9d58 HEX Value of a color to display as the stroke of the circle and line connecting to the grid.
color_icon boolean false If true, the icon will be colored with the color property. Otherwise it will be the same color as all other icons.
display_zero boolean true If set to true, the device will be displayed even if the entity state is 0 or not a number (eg: unavailable). Otherwise, the non-fossil section will be hidden.
display_zero_state boolean true If set to true, the state will be shown even if it is 0. If set to false, the state will be hidden if it is 0.
state_type string power The type of state to use for the entity. Can be power or percentage. When set to power the state will be the amount of power from the grid that is low-carbon. When set to percentage the state will be the percentage of power from the grid that is low-carbon.
unit_white_space boolean true If set to false will not add any whitespace between unit and state. Otherwise, white space will be added.
calculate_flow_rate boolean or number false If set to true, the flow rate will be calculated by using the flow rate formula (either the new or the old one, depending on your configuration). If set to a number, the flow rate will be set to that number. For example, defining the value 10 will ensure one dot will flow every 10 seconds.

Color Object

Name Type Description
production string HEX value of the color for circles labels and lines of production.
consumption string HEX value of the color for circles labels and lines of consumption.

Split entities

Can be use with either Grid or Battery configuration. The same unit_of_measurement rule as above applies.

Name Type Description
consumption string Entity ID providing a state value for consumption, this is required if using a split grid object.
production string Entity ID providing a state value for production

Secondary Info Configuration

This Feature allows you to configure an additional small text for each Individual Device. Here you can put , for example, the state of charge of an electric car.

Name Type Description
entity string required Entity ID providing a state value that is going to be displayed.
unit_of_measurement string A string to be used as the unit of measurement. (Important: don't forget surrounding string with quotes)
icon string An icon path to be displayed next to the state of the individual device. This is optional, meaning if you don't use this, no icon will be displayed.
unit_white_space boolean Default is true. If set to false will not add any whitespace between unit and state. Otherwise, white space will be added.
display_zero boolean Default is false. If set to true info will still be displayed if state of the entity is 0 or unavailable.
display_zero_tolerance number If set, the device will be displayed if the state is greater than the tolerance set. No need to set display_zero property to true.
decimals number The number of decimal places to round the value to.
template string Here you can enter a HA Template. The output of the template will be displayed. Space is limited inside the circle and too much text will result in overflow using ellipsis, so use with caution. Will update automatically in case one of the provided entities inside the template updates. Can only be used in case entity was not set.
accept_negative boolean Default is false. If set to true, negative values will be displayed as negative, otherwise they will be transformed to positive

Power Outage

This feature allows you to configure how the card handles a Grid Power Outage scenario.

| Name | Type | Description | | ------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | entity | string required | Entity ID providing a state that changes when there is a Power Outage. (eg: binary_sensor.grid_connection_status). Doesn't need to be a binary_sensor. | | entity_generator | string | Entity ID providing the power of a Generator. (eg: sensor.generator_power). This is optional, meaning if you don't use this, the card will assume the grid is the only source of power. | | state_alert | string | The state the provided entity is at when there is a power outage. Default is on, meaning if the entity's state is on the card will assume there is a power outage. | | icon_alert | string | An icon path to be override the grid icon when there is a power outage. Default is mdi:transmission-tower-off. | | label_alert | string | A text that will be displayed below the icon when there is a power outage. | | calculate_flow_rate | boolean or number | false | If set to true, the flow rate will be calculated by using the flow rate formula (either the new or the old one, depending on your configuration). If set to a number, the flow rate will be set to that number. For example, defining the value 10 will ensure one dot will flow every 10 seconds. |

Display Zero Lines

This object allows you to control the behavior of the flow lines that are inactive.

Name Type Description
mode string Valid Options are: show, hide, transparency, grey_out, custom
transparency number A number between 0 and 100. 100 means the line doesn't show at all. 0 means the line shows in full opacity. Default is 50. Will be used when the mode is either transparency or custom.
grey_color string or list of numbers Either a HEX Code or a List of three numbers between 0 and 255 in RGB order. Will be used when the mode is either grey_out or custom.

Minimal Configuration

Don't forget to change the entity ids

The following configurations will allow you to achieve your results with the least amount of lines of code / complexity. In these examples I decided to use the Split entities option, but feel free to use the combined entity option. More Info

Only Grid

type: custom:power-flow-card-plus
entities:
  grid:
    entity: sensor.grid_power
    power_outage:
      entity: sensor.power_outage
    display_state: one_way
    color_circle: true
watt_threshold: 10000

This should give you something like this:

demo_only_grid-2

Grid and Solar
type: custom:power-flow-card-plus
entities:
  grid:
    entity:
      consumption: sensor.grid_consumption
      production: sensor.grid_production
      display_state: one_way
      color_circle: true
  solar:
    entity: sensor.solar_production

This should give you something like this:

demo_solar_and_grid

Grid, Solar and Battery
type: custom:power-flow-card-plus
entities:
  grid:
    entity:
      consumption: sensor.grid_consumption
      production: sensor.grid_production
    display_state: one_way
    color_circle: true
  solar:
    entity: sensor.solar_production
  battery:
    entity:
      consumption: sensor.battery_consumption
      production: sensor.battery_production
    state_of_charge: sensor.battery_state_of_charge
    display_state: one_way
    color_circle: true
  home:
    color_icon: true
watt_threshold: 10000

This should give you something like this:

demo_grid_solar_bat-2

Mix & Match Config aka "Full Config"

This Configuration is a little bit random, it's just here to demonstrate the capabilities of this card.

type: custom:power-flow-card-plus
entities:
  home:
    entity: sensor.home_consumption
    color_icon: solar
  fossil_fuel_percentage:
    entity: sensor.fossil_fuel_percentage
    icon: mdi:pine-tree
    color_icon: true
    display_zero: true
    name: Non Fossil
    state_type: power
  grid:
    icon: mdi:ab-testing
    name: Provider
    entity:
      production: sensor.grid_production
      consumption: sensor.grid_consumption
  solar:
    icon: mdi:solar-panel-large
    entity: sensor.solar_production
  battery:
    name: Bateria
    icon: mdi:bat
    entity:
      consumption: sensor.battery_consumption
      production: sensor.battery_production
  individual:
    - entity: sensor.car_power
      icon: mdi:car-electric
      color: "#80b8ff"
      name: Denim Flash
      color_icon: false
    - entity: sensor.motorbike_power
      name: Qivi
      color_icon: true
      display_zero: true
      color: "#ff8080"
      icon: mdi:motorbike-electric
w_decimals: 0
kw_decimals: 2
min_flow_rate: 0.9
max_flow_rate: 6
watt_threshold: 10000
clickable_entities: true
title: Power Flow Card Plus

This should give you something like this: minimal_config_full

Random Configurations

2023-03-26-13-04-07 recording_multi_indiv demo demo_grid_solar_bat

UI Editor (available in version 0.2)

Tip

I've made a lot of improvements in version 0.2 for the UI-Editor. Now each field has its own subpage, meaning there is now much less scrolling. The biggest change in the editor is the fact that you can now add up to 4 individual devices, all through the UI! 🥳

ui-editor

Flow Formula

This formula is based on the official formula used by the Energy Distribution card.

max - (value / totalLines) * (max - min);
// max = max_flow_rate
// min = min_flow_rate
// value = line value, solar to grid for example
// totalLines = gridConsumption + solarConsumption + solarToBattery +
//   solarToGrid + batteryConsumption + batteryFromGrid + batteryToGrid

New Flow Formula

In contrast to the old flow formula, this formula calculates the flow rate independently from other lines, making it more intuitive to interpret the perceived power. This means that a state of 10W will always flow with the same velocity, no matter what other lines are doing. In other words this flow rate is calculated in absolute and not relative values.

To get this new Flow Formula to work, simply set use_new_flow_rate_model in the main configuration to true. You may want to play around with the max_expected_power, min_expected_power, max_flow_rate and min_flow_rate to get the speeds that you wish

if (value > maxIn) return maxOut; // In case power exceeds maximum expected power, use the fastest speed and ignore the rest.
return ((value - minIn) * (maxOut - minOut)) / (maxIn - minIn) + minOut;

// value = value of the current line to calculate (eg: grid to home)
//
// minIn = amount of watts at which the lowest speed will be selected.
//   ↳ In your configuration this is `min_expected_power`
//   ↳ eg: setting this at `100` means that at `100` watts, the dots will still flow at the lowest speed
// maxIn = amount of watts at which the highest speed will be selected.
//   ↳ In your configuration this is `max_expected_power`
//   ↳ eg: setting this at `2000` means that everything more than `2000` will flow at the highest speed selected
//
// minOut = amount of watts at which the lowest speed will be selected.
//   ↳ In your configuration this is `max_flow_rate`
//   ↳ eg: setting this at `5` means that one dot will take `5` second to travel
// maxOut = amount of watts at which the highest speed will be selected.
//   ↳ In your configuration this is `min_flow_rate`
//   ↳ eg: setting this at `1` means that one dot will take `1` second to travel

The following video aims to show the diffence between the two flow formulas:

REC-20230412155142.mp4

Notice that when the Power changes to only coming from the sun, the old formula accelerates to maintain a constant amount of dots/second. Using the new formula is more intuitive, since you can immediately see that the Solar Power is relatively low since the dots are flowing very slowly. On the old Flow Formula you might think that the sun is producing a lot of power, which in this case is not true.

At the end of the day these are two options and depending on what you're interested, one might suit you better than the other, that's why I kept the old formula, you have the choice. 🙂

To-Do List

Here is my to-do list containing a few enhancements I am planning in adding. The ones at the top are bigger priorities, so they’ll probably be available before the ones at the bottom.

  • Change Tap Action Behavior to be compatible with Browser Mod
  • Fill the circles #89
  • More than two Individual Devices #54
  • More than one solar source #23
  • Display Connected/Disconnected status #111
  • Grid Feed In Circle #119
  • Improve performance #144

I am still just one person working on this project and obviously have other things going on in my life, so feel free to contribute to the project. You can also feel free to create a PR with a new feature and I'll try my best to review it 😊

power-flow-card-plus's People

Contributors

andurilll avatar charles-sd avatar dependabot[bot] avatar fleury08 avatar flixlix avatar gauner666 avatar gcoan avatar misa1515 avatar semantic-release-bot avatar shadow7412 avatar shycats avatar sorenisager avatar tde01065 avatar ulic75 avatar wrt54g avatar xsirpreisx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

power-flow-card-plus's Issues

[Feature Request] Proportional Grid Feed-In

Y'know how the outer ring of the Home entity displays coloured sections which indicate how much power is coming from the grid vs solar vs battery? Having that for the grid entity with solar vs battery power would be righteous. It would require having different line colours for battery to grid and solar to grid.

Thanks very much for this card, it is excellent. Concisely informative cards like this are the best.

[BUG] color_icon and color_circle options not working as expected for Grid circle/icon

Seems to me that the color_icon and color_circle options do not work as expected for the grid circle?

Both options are great with the Solar and Home circle, but I can't achieve to dynamically color the Grid circle and icon according to grid consumption and production

Is that a bug in the card or again just a bug in my head? 😊

pic1: grid consumption is higher than production, grid circle is blue (correct) and grid icon is white (should be blue)
grafik

pic2: grid consumption is lower than production, grid circle should is still blue (should be magenta) and grid icon is white (should be magenta)
grafik

type: custom:power-flow-card-plus
entities:
  home:
    entity: sensor.rct_power_storage_dc10_consumer_power
    name: Home
    color_icon: true
    secondary_info:
      entity: sensor.rct_power_storage_dc10_grid_power_eurosaldo_hourly
      unit_of_measurement: Ct/h
  grid:
    entity:
      consumption: sensor.rct_power_storage_dc10_grid_power_consumption
      production: sensor.rct_power_storage_dc10_grid_power_production
      display_state: two_way
      color_circle: true
      color_icon: true
  solar:
    name: PV
    icon: mdi:white-balance-sunny
    color_icon: true
    entity: sensor.rct_power_storage_dc10_all_generators_power
    secondary_info:
      entity: sensor.rct_power_storage_dc10_all_generators_power_percentage
      unit_of_measurement: '%'
watt_threshold: 50000
w_decimals: 0
clickable_entities: true

Can't add "Gas" to the card

Hi, In the description of the card on git it states: "Display current power, gas, and water usage in a display that matches the the official Energy Distribution card included with Home Assistant as much as possible.".

But if I look at the possible entities:

grid
solar
battery
individual1
individual2
home
fossil_fuel_percentage

There is no "gas" option. I tried to configure the individual1 object, and that is possible, but then the flow is the wrong way around, Gas consumed should flow into the "home".

[BUG] Latest version doesn't load on iOS 12.5.7

Describe the bug
Since updating from v0.0.9.5 to v0.0.9.6, the card no longer loads on my old iPad Air running iOS 12.5.7.

This applies to all methods of accessing Home Assistant. The native app, Safari and Google Chrome. No issues on my iPhone running iOS 16.3.1 or any desktop platforms.

No other custom cards are impacted, I use mushroom cards extensively throughout, and they load without issue.

I've tried:

  • Clearing browser cache (Safari) and frontend cache (app).
  • Reinstalling app completely.
  • Restarting iPad.
  • Restarting Home Assistant server.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to dashboard containing power-flow-card-plus card.
  2. See error "Custom element doesn't exist: power-flow-card-plus" where card should be.

Expected behavior
The card should load and display the power flow UI.

Screenshots
IMG_0001

Smartphone (please complete the following information):

  • Device: iPad Air (1st gen)
  • OS: iOS 12.5.7
  • Browser: Safari, Chrome, Home Assistant app

Please make sure all of this applies and check the checkboxes, by writing "X" inside of them.

  • I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • I have the latest version of the card installed.

  • I have cleared my browser cache after installing, updating and configuring the card.

If you require any more info, please let me know. The Home Assistant app logs don't show anything useful. Thanks.

unit of measurement [BUG]

Describe the bug
The unit of measurement for the power to car is set to Kw. However, it shows in W on the card. see image
image

To Reproduce
set unit of measurement for power to car to Kw
include power_to_car to power-flow-card-plus. This looks like:

  individual1:
    entity: sensor.vw_id_4_charge_power
    icon: mdi:car-electric
    color: '#80b8ff'
    name: VW ID.4

Expected behavior
Expected that same unit_of_measurement is used in card as set on entity. see image
image

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Please make sure all of this applies and check the checkboxes, by writing "X" inside of them.

  • I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • I have the latest version of the card installed.

  • I have cleared my browser cache after installing, updating and configuring the card.

Zero Tolerance for grid?

Hi,
I tried to implement it myself but my coding skills suck.
It would be very handy to have the possibility to use the Zero tolerance feature also for grid sensors, as with grid-tied inverters, there is always a bit of a push and pull between the grid and the home to keep voltages in sync, but it's annoying to see those 5-10 watts pushed back and forth.
I think it would be much more pleasant to just have the choice to not display the grid energy below a certain threshold.

Feature Request: Home configuration entity to be displayed

At the moment I guess the watts value displayed inside the Home bubble is calculated automatically.

I would like the ability to display the value from the home entity you can optionally define.

Why? Well, there are losses with the inverter and battery in converting back and forth and currently these are effectively accounted for under the Home display.

The value I get for home is around 100W higher than what I am actually using, where as the value I define in the entity is my true house consumption. Yes, with this change if you looked at the dashboard and added the values together they would not match but I would rather see the true consumption of my house (so I can alert if its higher than expected etc).

Thanks!

Secondary Info for all devices?

I was thinking it'd be nice to be able to include secondary info on the grid bubble (in my case, the current price of electricity).

Is there something specific about individual devices that makes secondary information more viable, or could this safely be extended across all of the configurations?

Incorrect Example Config and Clickable Entities not working?

H, I absolutely love the adaptations you've made to the power flow card, it really is brilliant thank you.
I think I might have discovered a couple of bugs:

Incorrect example config?
Your example config shows entities in list format:

  grid:
    production:
      - sensor.grid_out_power
    consumption:
      - sensor.grid_in_power
  solar:
    - sensor.solar_power
  battery_charge:
    - sensor.battery_state_of_charge
  battery:
    production:
      - sensor.battery_in_power
    consumption:
      - sensor.battery_out_power

But, I can only get the card to work in the old-style format:

  grid:
    production: sensor.grid_out_power
    consumption: sensor.grid_in_power
  solar: sensor.solar_power
  battery_charge: sensor.battery_state_of_charge
  battery:
    production: sensor.battery_in_power
    consumption: sensor.battery_out_power

Is that just a typo in the readme that needs correcting or did you intend to use a newer list-style configuration and it's a bug?

Clickable Entities not Clickable
The Solar and Home bubbles don't open more-info dialogs when clicked for me. All of the other bubbles work fine, but I can't get solar and home to work. I've tried multiple different entities and browsers, is that a known bug?

Even with those issues, this is my new favourite power flow card :)

feature request - Show house load excluding EV charging

Great card thanks you.
Would it be a good idea to have the net value of the household usage shown as well as the total, when using with a Car Charger for example ?
for example if the total household power draw is 2KW but 1.5 KW is going to charge the car, it could show 0.5 being used by the house?

Feature request: Individual entities for solar

Really love this card!

But there's one thing that would make it even better, I have an Enphase solar system which offers per-panel solar production figures. Now I understand that having 20 different entities is not feasable, but it would be nice to have one grouped entity per side of the roof. (In my case that would be East, South, West).

Would something like that be feasible?

Thanks!

[FEATURE REQUEST] I cannot see an option, thus, would it be possible to use negative and positive values to determine battery charge/discharge rate?

My inverter supplies one value for charge/discharge rate of the battery for Amperes and again one value in Watt, so there is no charge or discharge value other than the fact that a positive number charges the battery and a negative number discharges the battery.

If possible, could a combined entry be used that automatically based on positive or negative values displays charge or discharge rate/value?

I'm being a bit daft today and can't think of alternatives, but part of the problem is that I'm still learning about Home Assistant and there may be a way to generate the separate charge and discharge entities in Home Assistant, just I am not aware how to, assuming it is possible.

Add option for "Gas" (or already possible?)

Hi,

Thanks for this card, very nice....
Can you add the option to add "gas" consumption ? (or if already possible can you tell me how)
Should look the same as with the normal energy card

[OTHER] Secondary_info entities only display whole numbers

Thanks so much for adding the secondary_info option on all bubbles in the latest beta. This is very useful, but I note that irrespective of the data type of the entity being displayed, it rounds values to the nearest whole number. This behaviour is not in line with the other existing primary entities which round to one decimal place. Would be really useful if you could bring the secondary_info entities in line with the primaries and support decimals. Thanks

Battery Production / Consumpsion issue with flows

I have the battery code set as the following..

`
type: custom:power-flow-card-plus
entities:
grid:
entity:
consumption: sensor.solax_grid_import
production: sensor.solax_grid_export
solar:
entity: sensor.solax_pv_power_total
battery:
entity:
consumption: sensor.solax_battery_power_charge
production: sensor.solax_battery_power_charge
state_of_charge: sensor.solax_battery_capacity

`

In this example battery consumption: sensor.solax_battery_power_charge and battery production: sensor.solax_battery_power_charge are the same value.

My Solax battery does not show the real time in/out the sensor just shows realtime usage which at the time can be + or -

So if i use the above code for the batts it screws with the flow of the balls & maths.

Individual item not displaying value (but click shows the value)

Hi, great item for my dash. I was after something like this to show individual devices.

My issue - I have set up for a current live and a day so far view. The live works as expected.
Day so far, the individual items show 0 instead of the correct entity value (in this case Immersion is at 5.9kw . If I click on the item it goes to the usual graph with the value shown. Suggest the entity is right?

image

This is when I click on Immersion on bottom chart:
image

Code I have for this bottom chart is:

type: custom:power-flow-card-plus
entities:
  grid:
    entity:
      consumption: sensor.solax_today_s_import_energy
      production: sensor.solax_today_s_export_energy
  solar:
    entity: sensor.solax_today_s_solar_energy
  battery:
    entity:
      consumption: sensor.solax_battery_output_energy_today
      production: sensor.solax_battery_input_energy_today
    state_of_charge: sensor.solax_battery_capacity
  individual1:
    entity: sensor.immersion_water_today
    icon: mdi:water-thermometer
    color: '#80b8ff'
    name: Immersion
    color_icon: true
    display_zero: true
  individual2:
    entity: sensor.ev_charger_today
    name: EV
    color_icon: true
    display_zero: true
    color: '#ff8080'
    icon: mdi:car-electric
clickable_entities: true

PS - If I change the entity to one of the working ones (Solar total) it also remains a 0 again suggesting my sensor is ok etc.
PPS - As the true value is 5 there is also a 'blob' flowing from the home to the Immersion. Seems to be just the value displayed not working.

[FEATURE REQUEST] Flow-Icon for emergency generator

There would still be room for an emergency power generator on the bottom left.
Could this still be implemented to display an emergency power generator flow.
The flow should then go to the grid. The unit would then be the power that the generator delivers.

combined entities not handling negative flows

Combined entities when a flow is positive/negative are not treated as inward/outward flows on flow-card respectively.

Negative flow on grid should show feed in from either battery or solar but it shows as an outward flow of negative number. the same occurs for battery. (see pic)

image

Config being used for combined entities for power on Fronius Smartmeter and Telsla Powerwall.

title: Power Flow
entities:
  grid:
    entity:
      consumption: sensor.solarnet_power_grid
  solar:
    entity: sensor.solarnet_power_photovoltaics
  battery:
    entity:
      consumption: sensor.powerwall_battery_now
    state_of_charge: sensor.powerwall_charge

Battery Level for individual

Like many others probably, I've added my electric car as one of the individual entries. It would be great if I could add a second entity for the current battery level. The percentage could be shown above the icon, just like for solar batteries.

Allow secondary_info to display text

Thank you, great card
I've added my eddi using individual1 and would like to use secondary_info to display the eddi's status.
I've installed the latest update which allows secondary information for all circles.
Would it be possible to allow text as well as numbers?

The stae for the eddi status can be things like "Stopped", "Diverting", "Paused", etc

[BUG] Doesn't convert from watts to kilowatts when setting `watt_threshold`

Discussed in #117

Originally posted by andrewmooreio April 21, 2023
Hi all,

I've enabled the watt_threshold option within the configuration. Which works great and converts sensors that report in kW to W if the value is <1kW.

Is it possible to do the same when the source sensor reports in W if the value is ≥1000W, converting to kW?

Thanks.

@andrewmooreio Feel free to continue this discussion here

[BUG/RFI] no more than two individual power entities

Describe the bug
Configuring more than two individual power entities is resulting in individual3 etc. pp not being shown.

To Reproduce

  1. Install Card
  2. configure more than two individual power entities

Expected behavior
more than two individual power entities should be displayed

Screenshots

Please make sure all of this applies and check the checkboxes, by writing "X" inside of them.

  • I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • I have the latest version of the card installed.

  • I have cleared my browser cache after installing, updating and configuring the card.

I did not find any hint in the documentation that it should not be possible to use/configure more than two individual power entities, but maybe this is limited in source. would ne nice to allow more than two or explicit say that no more than two is possible in documentation

i would agree that this may "look" stupid if there are too many power sources, but using "huge" contributors to power usage like heatpumps, wallboxes and washing maschines, etc. pp. would be nice to visualize.

Space between value and unit of measure

Since the latest version of the card the unit of measure (W/kW) is written right after the value (e.g. 10W / 20kW). Me nitpicking again, this is "wrong". There is "supposed to be" a space between the number and the unit (10 W / 20 kW / 30 kWh).

The space/blank was removed here: 42e609d

We should either change the code back to always use a space between the two, or give the user an option to choose.

No blank/space gives more room, but it always kind of looks wrong to my eye.

What do you think?

Change font colour

It'll be nice if the font colour can be changed.

My solar and home text are white while the grid is coloured.

image

Example with card-mod:

image

Flow Formula suggestion

At the moment it takes the current maximum and minimum currents. I think if we had the ability to set our own max and minimum values (either instead of or in addition to the real ones) we'd get a more realistic animation.

Eg, If I set my maximum to 5kw, then even if the total system is only seeing 300W the animation would be slow, because we have the hardcoded maximum. Also, hardcoding 0W to minimum would mean that everything should animate consistently relative to that range.

If that was acceptable behaviour, I could see the value of 0 being used instead of the calculated minimum and a config-driven value for maximum working quite well.

[BUG] subtract_individual not working

Describe the bug
I am trying to use subtract_individual: true in the home section as per documentation, but it is not working.

To Reproduce
Install Card and use the option

Expected behavior
all configured individual entity would be subtracted as expected

Screenshots
Side-by-side view:

Bildschirmfoto 2023-04-17 um 11 08 16

Desktop (please complete the following information):

  • OS: macOS
  • Browser Chrome, Firefox
  • latest

Additional context
It may also an issue that not all configured "individuals" are shown in the card view, although configured and display_zero: true set

** Config **

type: custom:power-flow-card-plus
entities:
  home:
    entity: sensor.home_consumption
    color_icon: solar
    subtract_individual: true
  fossil_fuel_percentage:
    entity: sensor.co2_signal_grid_fossil_fuel_percentage
    icon: mdi:pine-tree
    color_icon: true
    display_zero: true
    name: Non Fossil
    state_type: power
  grid:
    icon: mdi:transmission-tower
    color_icon: true
    display_zero: true
    entity:
      production: sensor.stromexport_leistung
      consumption: sensor.strombezug_leistung
  solar:
    icon: mdi:solar-panel-large
    entity: sensor.tripower_dc_leistung_gesamt
  battery:
    icon: mdi:home-battery-outline
    color_icon: true
    display_zero: true
    entity:
      consumption: sensor.batterieladung
      production: sensor.batterieentladung
    state_of_charge: sensor.batterieladezustand
  individual1:
    entity: sensor.openwb_cp1_ladeleistung
    icon: mdi:car-electric
    color: '#80b8ff'
    name: ID3
    color_icon: true
    display_zero: true
    secondary_info:
      entity: sensor.id_3_pro_state_of_charge
      unit_of_measurement: '%'
  individual2:
    entity: sensor.nous_sd1_trockner_active_power
    icon: mdi:tumble-dryer
    color: '#80b8ff'
    name: Trocker
    color_icon: true
    display_zero: true
  individual3:
    entity: sensor.nous_sd2_waschmaschiene_active_power
    icon: mdi:washing-machine
    color: '#80b8ff'
    name: WaMa
    color_icon: true
    display_zero: true
  individual4:
    entity: sensor.nous_sd3_spulmaschine_active_power
    icon: mdi:dishwasher
    color: '#80b8ff'
    name: Spüli
    color_icon: true
    display_zero: true
  individual5:
    entity: sensor.nous_sd4_rack_active_power
    icon: mdi:server-network
    color: '#80b8ff'
    name: Rack
    color_icon: true
    display_zero: true
w_decimals: 0
kw_decimals: 2
min_flow_rate: 0.9
max_flow_rate: 6
watt_threshold: 10000
clickable_entities: true
title: Energieübersicht

Please make sure all of this applies and check the checkboxes, by writing "X" inside of them.

  • I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • I have the latest version of the card installed.

  • I have cleared my browser cache after installing, updating and configuring the card.

Awesome card, this is the one i was looking form hopefully this can be sorted out and will be may new "home" screen for HA! Thanks!

[FEATURE REQUEST] - Show Secondary Information for fossil fuel

Is your feature request related to a problem? Please describe.
I would like to have the possibility to add a secondary information to the "CO2 Sensor"
The secondary info should be (in this case) the co2-sensor percentage value, like it can be done for the electric vehicle or battery (State of Charge)
image

Describe the solution you'd like
yaml code could look like this one:

  fossil_fuel_percentage:
    entity: sensor.co2_signal_grid_fossil_fuel_percentage
    icon: mdi:leaf
    color_icon: true
    display_zero: true
    name: Non Fossil
    state_type: power
    secondary_info:
      entity: sensor.co2_signal_grid_fossil_fuel_percentage
      unit_of_measurement: '%'
      state_type: percentage

Describe alternatives you've considered

Additional context

Height adjustment of card

Feature request.

Height adjustment of card to allow for easy layout in kiosk mode tablet displays?

Great work, thank you

Richard

[BUG] Override_state doesn't work for home.

Describe the bug
I set override_state: true for home config. It still shows the grid consumption total and not the value of the entity I set.

To Reproduce
I will just paste my yaml below:

title: Power Flow Card
type: custom:power-flow-card-plus
entities:
  grid:
    entity:
      consumption: sensor.victron_shore_power_input
    display_state: one_way
    color_circle: true
    icon: mdi:power-plug
    name: Shore Power
  battery:
    entity: sensor.eg4_ll_battery_load_watts
    state_of_charge: sensor.eg4_ll_battery_percent
    display_state: one_way
    color_circle: true
  home:
    color_icon: true
    name: Camper
    icon: mdi:rv-truck
    override_state: true
    entity: sensor.victron_ac_loads
    secondary_info:
      entity: sensor.victron_ac_loads
  individual1:
    entity: sensor.fridge_plug_instantaneous_demand
    icon: mdi:fridge
    color: '#80b8ff'
    name: Fridge AC
    color_icon: false
    display_zero: true
  individual2:
    entity: sensor.starlink_power_plug_instantaneous_demand
    icon: mdi:satellite-uplink
    color: '#80b8ff'
    name: Starlink
    color_icon: false
    display_zero: true
watt_threshold: 10000
clickable_entities: true
use_new_flow_rate_model: true

Expected behavior
I expected the home to display the value of the sensor.victron_ac_loads sensor. You can see in the screenshot below it correctly displays it for secondary info, but not the main entity.

Screenshots
Screenshot_20230419_150751_Home Assistant

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: Galaxy S21 Ultra
  • OS: Android
  • Browser companion app
  • Version [e.g. 22]

Additional context
Also looked in a new browser session and issue persists.

Please make sure all of this applies and check the checkboxes, by writing "X" inside of them.

  • [x ] I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • [ x] I have the latest version of the card installed.

  • [ x] I have cleared my browser cache after installing, updating and configuring the card.

[OTHER]

Hi,

your latest code (not the released JS file) seems to produce unit_of_measurement text where the first letter is in upper case, I believe. Only for secondary_info. Or maybe I did something wrong.

Didn't have much time and wasn't able to find the problem right away, so maybe you have an idea?

image

Non-fossil doesn't show on the Home node

This is probably related to #24 in some way.

Here's my config

title: Energia a temps real
type: custom:power-flow-card-plus
entities:
  grid:
    entity: sensor.power_meter_active_power
  solar:
    entity: sensor.inverter_active_power
  individual1:
    entity: sensor.regleta_tl_power
    name: Ordinador
    icon: mdi:monitor
    color: '#ff0000'
    display_zero: true
  fossil_fuel_percentage:
    entity: sensor.co2_signal_grid_fossil_fuel_percentage
    color_icon: true
    display_zero: true
    state_type: power
inverted_entities: grid
w_decimals: 0
kw_decimals: 2
clickable_entities: true
watt_threshold: 10000

And it looks like this:
image

I would expect the home node to be part yellow, part blue, and part green, with more green than blue, just like with the energy panel card, but there's no green to be seen.

Since there is green in the example card in the readme, I guess this is a bug.

[FEATURE REQUEST] Name and Icon from Entity.

First of all. I love this card.

It would be very helpful if the name and the icon can be defined via an entity or entity-attribute.

Example:

individual1:
  entity: sensor.load_1_usage_w
  icon: sensor.load_1_icon
  name: sensor.load_1_name
  display_zero: false

[BUG] When Individual power consumption is NaN, it breaks the calculation of home consumption when substracting

When an individual power consumption sensor is not available (like a pool heater disconnected during winter) and using the option to substract individual appliances power consumption from home consumption, it breaks the calculation and the home consumption is also displayed as NaN. I'd suggest to replace missing numbers with zeroes in such a case so as to not break the calculation.

Steps to reproduce the behavior:
And individual consumption entity, disconnect the entity, enable subtraction from home consumption.

Expected behavior
Missing consumption should be treated as zero.

Screenshots
image

(using version 0.1beta)

  • I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • I have the latest version of the card installed.

  • I have cleared my browser cache after installing, updating and configuring the card.

Suggestions

I must say I like the card very much, it has a lot of potential but still lacks some polishing. I can't program in phyton css or java so I'm sorry I can directly be of help, but I'd like to try to point out what I'd like to see implemented and how, hoping someone will pick this up.
First of all the secondary info seems to work a little hit and miss for me: numeric values are OK, non numeric sensor... It depends, I think maybe some bubbles can elaborate string sensors, other can't. The templating solution I saw in some PR will fix this, so I'll wait.
Second: at the moment I'm using another similar card for power flow https://github.com/reptilex/tesla-style-solar-power-card, and I'd like to point out what I like in that card that isn't in this one:

  • the flow speed in the other card is perfect and auto fit itself, no need to configure anything and it just works: I'd take a look at the code and try to replicate. In this car it's still buggy: the dots move at different speeds even between bubbles I just cant' find a way to make it look right for low power or high power;
  • it has an option to make unused lines disappear: it's much more clear for a power card (the original card is for energy so it makes sense that all the lines are there all the time, here's a comparison of the 2 cards, to me is so much clearer what's going on in the second image:
    image

[FEATURE REQUEST] Connected/Disconnected status

Is your feature request related to a problem? Please describe.
I'd like to be able to display the connected status of my EV on the line leading to the individual1 / individual2 circles.

Describe the solution you'd like
This could be shown with a disconnected line or perhaps a configurable mdi icon (eg mdi:power-plug-off) on top of the line beneath the circle.

disconnected_eg_1
disconnected_eg_2

Describe alternatives you've considered
You could set display_zero to false but then we can't see the EV state of charge which I'm sure most have set as the secondary_info entity.

Additional context
If I get time I'll try and do this myself and submit a pull request, I'm new to HASS though so will need to figure out how I get started with development.

Thanks for all your hard work so far! :)

display_state one_way not working [BUG]

Describe the bug
display_state one_way not working

To Reproduce
This is my current configuration:

type: custom:power-flow-card-plus
entities:
  grid:
    entity:
      consumption: sensor.hem5_from_grid
      production: sensor.hem5_to_grid
      display_state: one_way
      color_circle: true
  solar:
    entity: sensor.nep_power
kw_decimals: 0
w_decimals: 0
watt_threshold: 1000

Expected behavior
When I am injecting to the grid I would expect the "0" consumption to hide

Screenshots
Screenshot 2023-04-17 at 9 28 58 AM

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome

Additional context
Add any other context about the problem here.

Please make sure all of this applies and check the checkboxes, by writing "X" inside of them.

  • I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • I have the latest version of the card installed.

  • I have cleared my browser cache after installing, updating and configuring the card.

[FEATURE REQUEST] Nesting configs for individuals

Is your feature request related to a problem? Please describe.
I have a sprawl of DBs daisy-chained across my property, and would like to have that chain represented.

Describe the solution you'd like
I envision the individual power monitoring points in each DBs' configurations being nested under their parent, e.g.

individual1:
    entity: sensor.cottage
    icon: mdi:home
    color: '#80b8ff'
    name: Cottage
    color_icon: false
    subs:
      individual1:
      entity: sensor.koi_pond
      icon: mdi:fish
      color: '#80b8ff'
      name: Koi Pond
      color_icon: false
    individual2:
      entity: sensor.electric_fence
      name: Electric Fence
      color_icon: true
      display_zero: true
      color: '#ff8080'
      icon: mdi:motorbike-electric
  individual2:
    entity: sensor.motorbike_power
    name: Qivi
    color_icon: true
    display_zero: true
    color: '#ff8080'
    icon: mdi:motorbike-electric

Describe alternatives you've considered
I suppose an alternative would be to publish multiple cards.

Additional context
N/A

Hide In-active lines

Would it be possible to include an action to hide the lines between circles that are not currently active please?

[OTHER] How will be the "CO2 Signal" Sensor be calculated (percentage) ?

Hi,
I am currently playing arround with some of the options of the power-flow-card plus... and testing the CO2 signal information...

  fossil_fuel_percentage:
    entity: sensor.co2_signal_grid_fossil_fuel_percentage
    icon: mdi:leaf
    color_icon: true
    display_zero: true
    name: Non Fossil
    state_type: percentage

In this case, I've set the state_type to percentage... which gives me a value of 62%
image

How does the calculation work?
CO2 signal provides 38% "total" ...
and if I switch to state_type: power, the card is showing 0W - since I do have solar export...

image

Shows an empty card

No matter what I put in the config, all it shows is... nothing. An invisible card, just an empty card, even when using the same confg that worked for power-glow-card and for this fork before the name change.

Threshold for "display_zero"

I have some devices, such as my washing machine, displayed as an individual appliance. It's idle draw is around 1W.
It'd be useful to hide this appliance when it's not in use. Can we add a display_zero_tolerance style as a companion option to those that also have a display_zero argument?

An alternate implementation might have the display_zero option support both boolean and integer values. In integer mode, the appliance would be hidden if the current draw is lower than the number specified (presumably in W).

Padding on the additional circles

Just a small one, on the original circles the MDI have a 2px padding to the bottom of them, which helps push the text down. The additional circles are set at 0px.

[BUG] Top individual device flow not showing correctly on iPhone

Describe the bug
The top individual device flow is showing correctly on computer browser but not in the iOS app.

To Reproduce
Steps to reproduce the behavior:

  1. Add individual device
  2. Check in iOS app

Expected behavior
Animation on iOS app should be the same as it is on computer browser

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Edge
  • Version: latest

Smartphone (please complete the following information):

  • Device: iPhone 13
  • OS: iOS 16.4.1
  • Browser: Home Assistant App
  • Version: 2023.4

Additional context
N/A

Please make sure all of this applies and check the checkboxes, by writing "X" inside of them.

  • I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • I have the latest version of the card installed.

  • I have cleared my browser cache after installing, updating and configuring the card.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.