Feature: Add Device Track Sensor without breaking Geolocation sensor#158
Feature: Add Device Track Sensor without breaking Geolocation sensor#158denisabt wants to merge 2 commits intohass-agent:development-2.2.0-beta1from
Conversation
|
Apologies that it took so long, I have a few comments/requests regarding the PR. |
|
Sorry on my part now, github mails seem to go to spam for some weird reason. Up to you, if you have time, grab it and adjust, no problem at all :-) |
|
Yeah, today I've learned not to do git stuff when sick...I wanted to remove changes to some of the files, instead I deleted them from your repo. Very nice of me. Let me fix that... |
6ca11b2 to
754104d
Compare
|
Fixed, now some pills and I'll come back to it later. Sorry for the confusion, at least I've learned gh cli :D |
|
Hmm, I've taken a more in-depth look and few questions arose:
|
|
Hey @amadeo-alex, just wanted after a too long time check back on how it goes, and fortunatly, your question hasn't been unanswered for too long - still figuring out my provider's spam software, notifications still don't arrive at my inbox. But should be able to fix that in no time. Let me have a look at my code again and get back to you by tomorrow. I vaguely remember my reason for the cache, not sure about question one though, so let me get back, to get you a proper reply. Thanks for merging/checking/deleting&undeleting ;-) and your work in general! Back soon. |
|
In my GeolocationSensor.cs I pushed, Domain=device_tracker shows up twice. Not yet sure why that seems to be missing on your end. Regarding Caching, during my tests, I stumbled upon a situation in which Location Services from Windows where hammered with Requests from this Sensor / Hass.Agent, and put an unnecessary load on CPU/Battery (Laptop), also due to exceptions being thrown constantly (several times a minute or even seconds). And also, as even laptops rarely are used as high-res device trackers, I figured, getting location (expensive call in terms of CPU/battery) constantly is not needed. If you want, I can retest. Usually I comment these things, surprised I did not. Also just found two line feeds which are not needed at all - oups. But thanks for your review & thoughts about this - well spotted ! |
This additional sensor returns location as a device tracker sensor, which can directly be added to a map card. Addidional strings (Sensor Description) have been machine translated into all implemented languages.
Also applied minor code cleanups (remove usings, add missing parameters to xml comments).