WebSocket API Google Charts for Home Assistant > 0.100

A small project of mine to compare in real time diverse sensor values values using Google Charts.


  • Can be used standalone of HASS;
  • Uses the new (as of Dec 2019) Long-Lived Access Token auth system;
  • Can be embedded as in iframe in lovelace;
  • Updates in real time;
  • Sortable by name or value;
  • Chart type can be changed on the fly (3 default options: column, bar, piechart - more can be added: read the comments in the state-card-gchart.html file);
  • Supports one more more entities (recomended to compare: power, temperature, humidity, mold etc.).
  • Could be also use as a weather forecast (disabling some of the options might be needed).
  • Highly customizable (styling, axes types, annotations etc.). Visit Google Charts for more information and options (ColumnChart, BarChart, PieChart).



i’m trying to use this with my home-assistant installation.
i’m running Home-Assistant on Ubuntu Server with VirtualEnv and getting this error in the ui:” 404 not found.
What am i missing?


Very nice @covrig what are you using to measure the energy consumption of all the entities?

I am using the InfluxDB platform plus the InfluxDB Sensor. Cheers.

Weird. Sounds like a issue with your installation. A bit difficult to debug without access to your machine.
Is this the only problem you have with your setup?

What javascript_version do you have in your frontend section? My platform won’t work on all versions.

What hardware are you using to measure the usage? This is a cool idea

Well, any hardware configuration is possible.
I am using a bunch of ZWave sockets (Aeotec, Fibaro).

i was using VirtualEnv above ubuntu 16,
i have now installed a new and fresh Ubuntu 18 and reinstalled Home Assistant/
i’ll give it a try again.

Hey - I am keen to get the pie chart to display within Lovelace - but I can only see the ‘groups’ method for choosing elements for display.

Is this ready for lovelace, and if so - what is the ‘card type’?

Hello. Sadly, it isn’t ready for lovelace.
It is hard keeping up with the frequent changes in HASS (every other update breaks some custom tools). I will wait a bit until the situation normalizes and then update it. Sorry.

1 Like

That’s really cool, I’ve been trying to do something similar with chart.js but have did not manage to get the HA data into JSON data. Would it work with a mysql (mariaDB) database?

Why don’t you install InfluxDB and Grafana? You can create all the charts you want. Or you would like something in the HASS interface?

I did get Grafana working but I’m after something a little more integrated with the UI, with realtime updates, etc. I’m still using the Old UI also so I’ll give this a try. I’ve just found that there is a mysql sensor I can use to I should be able to get MariaDB to work also.

I updated the code to work with the new Long-Lived Access Token auth system.