ha-hildebrandglow icon indicating copy to clipboard operation
ha-hildebrandglow copied to clipboard

Use MQTT to get instant updates

Open ndfred opened this issue 4 years ago • 2 comments

This component uses HTTP polling through Async to update values, using MQTT instead would provide more up to date information

ndfred avatar Jul 20 '20 22:07 ndfred

I've been digging and dumped some MQTT connection and parsing code here. We can basically get all the data we need in real time, without worrying about tokens, which I think is a better fit for this component. Next I'll try and see if I can just get away with Home Assistant templates.

ndfred avatar Jul 21 '20 21:07 ndfred

I've continued my research and now have MQTT bridging and templates working! I now gather instant electricity consumption, as well as daily / weekly / monthly electricity and gas consumption and meter readings, in real time. Maybe this is what the HA component should be doing: just maintain an MQTT connection and present the data in a few nice sensors.

ndfred avatar Jul 23 '20 07:07 ndfred