All Projects → JonahKr → power-distribution-card

JonahKr / power-distribution-card

Licence: MIT license
A Lovelace Card for visualizing power distributions.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to power-distribution-card

MeteoalarmCard
Meteoalarm, Météo-France and DWD severe weather warnings card for Home Assistant Lovelace UI ⛈️
Stars: ✭ 48 (-58.97%)
Mutual labels:  homeassistant, hacs, lovelace-card
home-assistant-theme-outline
🎨 Home Assistant Theme: Outline
Stars: ✭ 20 (-82.91%)
Mutual labels:  homeassistant, hacs
lovelace-light-soft-ui-theme
🎨 Home Assistant soft UI light theme, with help from @JuanMTech, @thomasloven, and @N-l1.
Stars: ✭ 59 (-49.57%)
Mutual labels:  homeassistant, hacs
homeassistant-coronavirus-hessen
[Unmaintained] Home Assistant component to scrape the current SARS-CoV-2 data for the German state of Hessen from the website of the Hessisches Ministerium für Soziales und Integration.
Stars: ✭ 15 (-87.18%)
Mutual labels:  homeassistant, hacs
homeassistant-jlrincontrol
An integration for JLR InControl to Home Assistant
Stars: ✭ 34 (-70.94%)
Mutual labels:  homeassistant, hacs
midea-ac-py
This is a library to allow communicating to a Midea appliance via the Midea cloud.
Stars: ✭ 72 (-38.46%)
Mutual labels:  homeassistant, hacs
home-assistant-omnik-inverter
Read the current, daily and total Wh from your Omnik Inverter via local network (no cloud!)
Stars: ✭ 45 (-61.54%)
Mutual labels:  homeassistant, hacs
home-assistant-miele
Miele integration for Home assistant
Stars: ✭ 101 (-13.68%)
Mutual labels:  homeassistant, hacs
ha-eskom-loadshedding
Fetches loadshedding data from Eskom
Stars: ✭ 48 (-58.97%)
Mutual labels:  homeassistant, hacs
homeassistant-afvalwijzer
Provides sensors for some Dutch waste collectors
Stars: ✭ 119 (+1.71%)
Mutual labels:  homeassistant, hacs
hass-miwifi
MiWiFi for Home Assistant
Stars: ✭ 116 (-0.85%)
Mutual labels:  homeassistant, hacs
home-assistant-flair
Custom component for Home Assistant Core for Flair pucks, vents, rooms, structures, and minisplits
Stars: ✭ 51 (-56.41%)
Mutual labels:  homeassistant, hacs
HomeAssistant-Cupertino-Icons
Apple SF Symbols icons for Home Assistant! (3000+ icons)
Stars: ✭ 100 (-14.53%)
Mutual labels:  homeassistant, hacs
charger-card
A lovelace card for electrical vehicle (EV) home chargers and charging robots.
Stars: ✭ 57 (-51.28%)
Mutual labels:  homeassistant, hacs
custom-brand-icons
Custom brand icons for Home Assistant
Stars: ✭ 242 (+106.84%)
Mutual labels:  homeassistant, hacs
ha-sengledapi
Home Assistant Integration for Sengled Bulbs. This is a custom component to allow control of Sengled Bulbs in Homeassistant using the unofficial Sengled API. Please note this mimics the Sengled app and therefore Sengled may cut off access at anytime.
Stars: ✭ 85 (-27.35%)
Mutual labels:  homeassistant, hacs
fullscreen-card
Make your Home Assistant browser fullscreen with one tap.
Stars: ✭ 23 (-80.34%)
Mutual labels:  homeassistant, hacs
thermal
Thermal Vision Sensor and Camera for Home Assistant
Stars: ✭ 43 (-63.25%)
Mutual labels:  homeassistant, hacs
home-assistant-p2000
🚒 This component tracks P2000 emergency events in The Netherlands.
Stars: ✭ 45 (-61.54%)
Mutual labels:  homeassistant, hacs
lovelace-rpi-monitor-card
A Raspberry Pi status display Card for Home Assistant Lovelace
Stars: ✭ 102 (-12.82%)
Mutual labels:  homeassistant, lovelace-card

power-distribution-card

GitHub package.json version Actions Status GitHub license hacs_badge Buy Me A Coffee

Inspired by e3dc-logo

The Lovelace Card for visualizing power distributions.




Installation

Installation via HACS

  1. Make sure the HACS custom component is installed and working.
  2. Search for power-distribution-card and add it through HACS
  3. Refresh home-assistant.

Manual installation

  1. Download the latest release of the power-distribution-card
  2. Place the file in your config/www folder
  3. Include the card code in your ui-lovelace-card.yaml
resources:
  - url: /local/power-distribution-card.js
    type: module

Or alternatively set it up via the UI: Configuration -> Lovelace Dashboards -> Resources (TAB) For more guidance check out the docs.




Configuration

Presets

Every Sensor you want to add has to use one of the Presets. You can add as many of these as you want.

mdi-battery-outline mdi-electirc-car mdi-lightbulb mdi-transmission-tower mdi-home-assistant mdi-hydro-power mdi-pool mdi-lightning-bolt-outline mdi-solar-power mdi-wind-turbine mdi-radiator
battery car_charger consumer grid home hydro pool producer solar wind heating
Any Home Battery e.g. E3dc, Powerwall Any Electric Car Charger A custom home power consumer The interface to the power grid Your Home's power consumption Hydropower setup like Turbulent pool heater or pump custom home power producer Power coming from Solar Power coming from Wind Radiators

The presets consumer and producer enable to add any custom device into your Card with just a bit of tweaking.


Simple Configuration 🛠️

With Version 2.0 a Visual Editor got introduced. You can find the Card in your Card Selector probably at the bottom. From there on you can configure your way to your custom Card. The easiest way to get your Card up and running, is by defining the entities for the presets directly.


! Please Check for every Sensor: positive sensor values = production, negative values = consumption
! If this is the other way around in your Case, check the `invert_value` setting (Advanced Configuration)!

Placeholder

By submitting an empty entity_id and preset, you will generate a plain transparent placeholder item which can be used to further customize your layout.



YAML Only

If you are a real hardcore YAML connoisseur here is a basic example to get things started:

type: 'custom:power-distribution-card'
title: Title
animation: flash
entities:
  - entity: sensor.e3dc_home
    preset: home
  - entity: sensor.e3dc_solar
    preset: solar
  - entity: sensor.e3dc_battery
    preset: battery
center:
  type: bars
  content:
    - preset: autarky
      name: autarky
    - preset: ratio
      name: ratio

You can find all options for every entity here. If you want to further modify the center panel youz can find the documentation here.



Animation

For the animation you have 3 options: flash, slide, none

type: 'custom:power-distribution-card'
animation: 'slide'

Center Panel

For customizing the Center Panel you basically have 3 Options:

None 🕳️

the void


Bars 📊

Bars have the following Settings:

Setting type example description
bar_color string red, #C1C1C1 You can pass any string that CSS will accept as a color.
bar_bg_color string red, #C1C1C1 The Background Color of the Bar. You can pass any string that CSS will accept as a color.
entity string sensor.ln_autarky You can specify the entity_id here aswell.
invert_value bool false This will invert the value recieved from HASS. This affects calculations aswell!
name string Eigenstrom Feel free to change the displayed name of the element.
preset 'ratio' 'autarky' 'custom' all in type Option to autocalc ratio/autarky.
tap_action Action Config Configuration Single tap action for item.
double_tap_action Action Config Configuration Double tap action for item.
unit_of_measurement string W , kW Default: %; The Unit of the sensor value. Should be detected automatically!

Cards 🃏

Cards couldn't yet be included in the Visual editor in a nice way. I am working on it though. Feel free to open a Issue with suggestions. To add a card you can simply replace the center part in the Code Editor. Be aware though: While you can switch between none and card without any issues, switching to Bars will override your settings.

For example you could insert a glance card:

center:
  type: card
  content:
    type: glance
    entities:
      - sensor.any_Sensor


Entity Configuration ⚙️

There are alot of settings you can customize your sensors with:

Setting type example description
attribute string deferredWatts A Sensor can have multiple attributes. If one of them is your desired value to display, add it here.
arrow_color object {smaller:'red'} You can Change the Color of the arrow dependant on the value. (Bigger, Equal and Smaller)
calc_excluded boolean true If the Item should be excluded from ratio/autarky calculations
color_threshold number 0, -100, 420.69 The value at which the coloring logic your switch on. (default: 0)
decimals number 0, 2 The Number of Decimals shown. (default: 2)
display_abs boolean false The displayed values are Absolute normally. You can change that here.
double_tap_action Action Config Configuration Double tap action for item.
entity string sensor.e3dc_grid You can specify the entity_id here aswell.
hide_arrows bool true Toggeling the visibility od the arrows.
icon string mdi:dishwasher Why not change the displayed Icon to any MDI one?
icon_color object {smaller:'red'} You can Change the Color of the icon dependant on the value. (Bigger, Equal and Smaller)
invert_arrow bool true This will change the arrows direction to the oposite one.
invert_value bool false This will invert the value recieved from HASS. This affects calculations aswell!
name string dishwasher Feel free to change the displayed name of the element.
secondary_info_attribute string min_temp Requires Entity. Instead of Sensor, the Attribute Value gets displayed.
secondary_info_entity string sensor.e3dc_grid entity_id of the secondary info sensor
secondary_info_replace_name bool true This will replace the name of the item with the secondary info.
tap_action Action Config Configuration Single tap action for item.
threshold number 2 Ignoring all abolute values smaller than threshold.
unit_of_display string W , kW , adaptive The Unit the value is displayed in (default: W). Adaptive will show kW for values >= 1kW
unit_of_measurement string W , kW The Unit of the sensor value. Should be detected automatically!

This could look something like:

entities:
  - decimals: 2
    display_abs: true
    name: battery
    unit_of_display: W
    consumer: true
    icon: 'mdi:battery-outline'
    producer: true
    entity: sensor.e3dc_battery
    preset: battery
    icon_color:
      bigger: 'green'
      equal: ''
      smaller: 'red'


Preset features

The Presets battery and grid have some additional features which allow some further customization. For the Battery the icon can display the state of charge and the grid preset can have a small display with power sold and bought from the grid.

If one of those presets is selected there will be additional options in the visual editor. If you prefer yaml, here are all extra options which can be set per item:

Setting type example description
battery_percentage_entity string sensor.xyz Sensor containing the battery charge percentage from 0 to 100
grid_buy_entity string sensor.xyz Sensor containing the imported power from the grid
grid_sell_entity string sensor.xyz Sensor containing the sold power towards the grid

FAQs

What the heck are these autarky and ratio calculating?

So basically these bar-graphs are nice indicators to show you:

  1. the autarky of your home (Home Production like Solar / Home Consumption)
  2. the ratio / share of produced electricity used by the home (The Germans call it Eigenverbrauchsanteil 😉)

kW and kWh is not the Same!

I know... In this case usability is more important and the user has to decide if he is ok with that.



If you find a Bug or have some suggestions, let me know here!

If you like the card, consider starring it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].