Ernst79 / degree-days

Integration that determines (weighted) degree days, gas consumption per degree day and a gas prognose for the current year based on weather info from the KNMI and your gas consumption.
MIT License
10 stars 5 forks source link

Sensor for current year gas consumption #22

Closed 0000vt closed 9 months ago

0000vt commented 9 months ago

As you mention in the readme, a Gas sensor entity with the total consumption this year should be feeded to the integration.

Is this a sensor of the last 365 days? Or a sensor from the 1st of january? What is needed by the integration?

Ernst79 commented 9 months ago

You will need a sensor that reports the total amount of gas starting from the start date that you specify in the settings of the integration. You can e.g. use a utility meter in HA to generate a sensor with the year total starting at 1-januari (or a different date, by setting an offset). See https://www.home-assistant.io/integrations/utility_meter/

You can use that sensor as input for degree-days and set the start date to the same date as your utility meter sensor.

Ernst79 commented 9 months ago

Please note that 0.9.3 has a small error when adding a new sensor, 0.9.4 should fix it

0000vt commented 9 months ago

Ok, thats what i had since november with the offset built in. But now the weighted degree days are reset since yesterday due to the new year. Because the degree days stayed around 2300 and the consumption got to zero.

Ernst79 commented 9 months ago

Not sure I understand it right, but assuming your gas sensor is reporting the total from 1 November

Is that what you use?

BTW, I have updated the readme a little bit with an example.

0000vt commented 9 months ago

Oh I get it. I had the yearly utility meter started in november, but it resets 1st of january. Thats two different offsets. Anyway, got to start from 1st of january now since the sensor had some weird data now.

Thanks for the explanation.

Ernst79 commented 9 months ago

Yep, then change the Startday to 1 and the Startdate to January.

The Utility Meter in HA resets at January 1st by default, unless you set a meter reset offset.