ooii / pySuez

Get your water consumption data from your Suez account (www.toutsurmoneau.fr)
Apache License 2.0
8 stars 12 forks source link

Lovelace #3

Open halfbaked opened 4 years ago

halfbaked commented 4 years ago

Salut Farid,

I have setup the Suez water component in my home assistant, and it pulls in the data great. Do you have an example of how to use the data pulled in? How best to display it in lovelace?

thanks, Eamonn

ooii commented 4 years ago

Salut Eamonn,

The problem with Suez's website is its update rate. It is supposed to provide water consumption of previous day and that's the value I'm sending to the sensor each time it fetches data. However, it happens (too frequently) that the website requires 2 days to provide consumption information. In such a case, the sensor will receive 0 as data value, which makes the sensor display something similar to that (if one uses the sensor value directly):

image

However, if you check the attributes of the sensor, you have plenty of information:

image

and

image

among others. Using this data, you can create a template sensor with the information you need and display it using a Lovelace card. If getting the information in a template sensor is too complex (considering 7 last days for instance needs to check if these days do not overlap over two months or even two years), I can provide this information directly in a future update of the sensor.