Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor icon indicating copy to clipboard operation
Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor copied to clipboard

Add a sensor component

Open kozerskil opened this issue 4 years ago • 8 comments

After updating to 1.0.5 CPU usage and temperature have increased. https://imgur.com/a/U43Z7nF With green line highlighted time where I restarted HA after updating the component. Hardware: RPi3 with HDD.

kozerskil avatar Jan 21 '21 09:01 kozerskil

Was this component working for you before update?

PiotrMachowski avatar Jan 21 '21 09:01 PiotrMachowski

Well, I have it for quite some time, however there was this issue that after some time the map didn't refresh.

kozerskil avatar Jan 21 '21 09:01 kozerskil

So increased CPU usage is probably a difference between working and not working integration. Unfortunately this component have to consume a bit of CPU: it downloads and parses an image every 5 seconds. You can reduce it by changing scale to 1, trimming map and increasing scan interval.

PiotrMachowski avatar Jan 21 '21 10:01 PiotrMachowski

Makes sense. I'll adjust the settings. I have one more idea tho: would it be possible to have attributes only (like vacuum_position) without the image?

kozerskil avatar Jan 21 '21 10:01 kozerskil

It is possible to do it for most of attributes, but not for all of them - some of them are calculated using map image

PiotrMachowski avatar Jan 21 '21 10:01 PiotrMachowski

ok, I'd like to test it, but how to make the component not to draw anything?

kozerskil avatar Jan 21 '21 11:01 kozerskil

Oh, sorry, my answer was misleading. It is possible for me to implement it, it is not possible in current version of integration

PiotrMachowski avatar Jan 21 '21 11:01 PiotrMachowski

Point taken, it's up to you then :)

kozerskil avatar Jan 21 '21 11:01 kozerskil