Coder Social home page Coder Social logo

lovelace-gazpar-card's Introduction

Home Assistant Lovelace Gazpar Card

$\text{\color{green}{!!! This library is working again. CAPTCHA has been removed !!!}}$

GrDF Gazpar meter lovelace card for Home Assistant.

This card has been inspired from the great Linky Card.

I reuse the same layout.

Gazpar Card

It requires the HA integration Gazpar at least from version 1.3.0.

Trend ratio (% in the table) must be interpreted differently depending on the frequency:

  • Daily trend ratio is between two days with a week apart (for example, we compare two consecutive Sunday).

  • Monthly trend ratio is between two months with a year apart (for example, we compare Feb21 with Feb22).

Installation

Method 1 : HACS (recommended)

Follow the steps described below to add GrDF Gazpar integration with HACS:

  1. From HACS (Home Assistant Community Store), open the upper left menu and select Custom repositories option to add the new repo.

  2. Add the address https://github.com/ssenart/lovelace-gazpar-card with the category Lovelace Plugins, and click ADD. The new corresponding repo appears in the repo list.

  3. Select this repo (this integration description is displayed in a window) and click on INSTALL THIS REPOSITORY button on the lower right of this window.

  4. Keep the last version and click the button INSTALL on the lower right.

  5. Do click on RELOAD button for completion! The integration is now ready. It remains the configuration.

Method 2 : Manual

  1. Copy the content of the dist directory in HA config/www/gazpar-card directory.

  2. Add the file path /local/gazpar-card/gazpar-card.js as a new Dashboard ressource (Module JavaScript).

Configuration

In the configuration panel, play with the toggles and see how it affects the card layout.

Gazpar Card Configuration

Alternatively, you can configure your card manually with the following code:

type: custom:gazpar-card

entity: sensor.gazpar
title: Données GrDF
pricePerKWh: '0.06072'

showIcon: true
showTitle: true
showMainBar: true
showCost: true

showDailyHistory: true
showMonthlyHistory: true
showHistoryHeader: true
showEnergyHistory: true
showVolumeHistory: true
showTrendRatioHistory: true
showCostHistory: true

showDailyCostHistoryChart: false
showDailyEnergyHistoryChart: false

showWeeklyEnergyHistoryChart: false
showWeeklyCostHistoryChart: false

showMonthlyEnergyHistoryChart: false
showMonthlyCostHistoryChart: false

showYearlyEnergyHistoryChart: false
showYearlyCostHistoryChart: false

showError: true
showVersion: true

lovelace-gazpar-card's People

Contributors

landaisbenj avatar ssenart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lovelace-gazpar-card's Issues

Can't see the repo in HACS

I have a problem with the card few days ago, it's stop working,not displaying.
I uninstall the repo and delete it, I try to add it again but don't see it's in the list but still's in the repo.
After reboot the plugin disappeared from the repo.
Help please.
Pat

[Bug] Error message too long

Bonjour.
Simplement pour signaler que certains messages d'erreurs sont longs... très longs... et mettent à mal tout le Dashboard ! 🤣

Une capture sera mieux que des explications... 😅

image

Display issues when data is uncommon

Hi,
Thanks for the work it's a really nice addition to Home Assistant (for frenchies ;))

I have two small issues on the monthly history part as you can see below:
image

  1. Since I had no consumption at all in August this year, the percentage of trend is shown as "-Infinity%"
    I understand why but it is not really nice and the table layout is affected. Would it be possible to make it shorter (-∞ or even NA) or simply remove the percentage trend (while keeping the green arrow though) ?

  2. My GRDF contract has started in April 2021, so the data cannot be fechted before for yearly comparison. The table seems to handle this properly.
    However, on the graph, you can see that the last year grey lines are not affected to the proper months, seems like the missing value are not counted as zero. The grey lines should be shifted to the right with the highest one affected to October.
    Here is a screenshot of GRDF graph for comparison.
    image

If I have time to work on this I can try to do a PR on your repo, let me know.

[Bug] January month disappear, December appears twice

Happy New Year,

I'm back with a new strange things on this wonderful card.

image

As you can see, the january month is not shown, but there are twice D for December.
The comparison with December data is made on both double D columns.
This problem already happen since last week at least, didn't had time to post it sooner.

Let me know if you need anything else

Fix overflow on monthly history table when using mobile

Hi again,

I notice that when I open the card with the mobile application, the monthly history table is truncated on the right (which contains the last/current months) as seen below
image
You cannot see September + October.

Would it be possible to change the overflow css property on week-history class from hidden to scroll (or something similar).
Expected result is to have an horizontal scrollbar:
image

Thanks

Cost missing

Hello, now that the Gazpar integration is working again 😄, l reinstalled it, but have an issue with this Lovelace card.. it appears differently with two entities and no cost.. why clue on what is going wrong?
Screenshot_20240510_202718_Home Assistant.jpg

[Bug] No graph with Firefox

Hi

many thanks for your card.

With the HA application on IOs or Edge on Windows I can see the graphics. But with Firefox on Windows, I don't see them

In the Firefox web tools, I can see some errors related to chart.min.js, for example

Uncaught (in promise) Error: Canvas is already in use. Chart with ID '0' must be destroyed before the canvas with ID 'monthlyEnergyHistoryChart' can be reused.
bn chart.min.js:13
updateMonthlyEnergyChart gazpar-card.js:115
updated gazpar-card.js:101
_$AE app.d6aee905.js:1249
performUpdate app.d6aee905.js:1249
scheduleUpdate app.d6aee905.js:1249
_$EC app.d6aee905.js:1249
requestUpdate app.d6aee905.js:1249
set app.d6aee905.js:1249
value hui-masonry-view.ts:44
value hui-masonry-view.ts:44
performUpdate app.d6aee905.js:1249
scheduleUpdate app.d6aee905.js:1249
_$EC app.d6aee905.js:1249
requestUpdate app.d6aee905.js:1249
set app.d6aee905.js:1249
value cebaf2eb.js:369
_$AE app.d6aee905.js:1249
performUpdate app.d6aee905.js:1249
scheduleUpdate app.d6aee905.js:1249
_$EC app.d6aee905.js:1249
requestUpdate app.d6aee905.js:1249
set app.d6aee905.js:1249
k app.d6aee905.js:1249
_$AI app.d6aee905.js:1249
m app.d6aee905.js:1249
T app.d6aee905.js:1249
_$AI app.d6aee905.js:1249
S app.d6aee905.js:1249
update app.d6aee905.js:1249
performUpdate app.d6aee905.js:1249
scheduleUpdate app.d6aee905.js:1249
_$EC app.d6aee905.js:1249
requestUpdate app.d6aee905.js:1249
set app.d6aee905.js:1249
value app-drawer-layout.js:189
value hass-loading-screen.ts:11
performUpdate app.d6aee905.js:1249
scheduleUpdate app.d6aee905.js:1249
_$EC app.d6aee905.js:1249
requestUpdate app.d6aee905.js:1249
set app.d6aee905.js:1249
k app.d6aee905.js:1249
_$AI app.d6aee905.js:1249
m app.d6aee905.js:1249
T app.d6aee905.js:1249
_$AI app.d6aee905.js:1249
S app.d6aee905.js:1249
update app.d6aee905.js:1249
chart.min.js:13:87572
_$EC app.d6aee905.js:1249
AsyncFunctionNext self-hosted:807
(Asynchrone : async)
requestUpdate app.d6aee905.js:1249
set app.d6aee905.js:1249
value hui-masonry-view.ts:44
forEach self-hosted:203
value hui-masonry-view.ts:44
performUpdate app.d6aee905.js:1249
scheduleUpdate app.d6aee905.js:1249
_$EC app.d6aee905.js:1249
AsyncFunctionNext self-hosted:807
(Asynchrone : async)
requestUpdate app.d6aee905.js:1249
set app.d6aee905.js:1249
value cebaf2eb.js:369
_$AE app.d6aee905.js:1249
performUpdate app.d6aee905.js:1249
scheduleUpdate app.d6aee905.js:1249
_$EC app.d6aee905.js:1249
AsyncFunctionNext self-hosted:807
(Asynchrone : async)
requestUpdate app.d6aee905.js:1249
set app.d6aee905.js:1249
k app.d6aee905.js:1249
_$AI app.d6aee905.js:1249
m app.d6aee905.js:1249
T app.d6aee905.js:1249
_$AI app.d6aee905.js:1249
S app.d6aee905.js:1249
update app.d6aee905.js:1249
performUpdate app.d6aee905.js:1249
scheduleUpdate app.d6aee905.js:1249
_$EC app.d6aee905.js:1249
AsyncFunctionNext self-hosted:807
(Asynchrone : async)
requestUpdate app.d6aee905.js:1249
set app.d6aee905.js:1249
value app-drawer-layout.js:189
value hass-loading-screen.ts:11
performUpdate app.d6aee905.js:1249
scheduleUpdate app.d6aee905.js:1249
_$EC app.d6aee905.js:1249
AsyncFunctionNext self-hosted:807
(Asynchrone : async)
requestUpdate app.d6aee905.js:1249
set app.d6aee905.js:1249
k app.d6aee905.js:1249
_$AI app.d6aee905.js:1249
m app.d6aee905.js:1249
T app.d6aee905.js:1249
_$AI app.d6aee905.js:1249
S app.d6aee905.js:1249
update app.d6aee905.js:1249
Error: Promised response from onMessage listener went out of scope ExtensionMessagingService.js:89:34

I don't know if this related to my brower setup or not

Nicolas

2 'D' month till 04/01

Sorry, didn't take a screenshot, but the card had 2 'D' months instead of a 'D' and 'J' month until tonight.
Some side effect I guess.

Not working

Hi

I currently have the Gazpar module (installed from HACS).
I've tried to set up the lovelace gazpar card but I get
image

what did I miss ?

thx for the work
Al

[Bug] Valeur change sur le dashboard aléatoirement

Bonjour, et d'abord merci pour cette intégration :)

Je rencontre un problème étrange.
Les données affichées varient quand j'actualise ma page, elle passe du 02/11/2022 au 20/10/2022 à chaque rafraichissement de la page.
Je constate aussi le problème à chaque édition d'une option de la carte

Avez-vous déjà rencontré ce soucis ?

Exemple ici ou j'active/désactive l'option "Show monthly cost history chart"

image
image

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.