-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add independent sensors and remove attributes from device_tracker #30
Conversation
Thanks so much for the PR! Two requests:
|
Oof. Ok, I can try. Re the other sensors, which ones you mean? The attributes within the I didn't see many others that were too useful. I can still try, but please clarify which ones.
|
Sorry, my bad—I forgot that I had been using I would include all of those except for user, pass, lat, and long. (Almost all of these are already included as device_tracker attributes. Ideally, with this PR, we'll also remove all non-location-related attributes from the device_tracker, and I wouldn't want to decrease the overall functionality provided by the integration.) This would be in keeping with the general approach by Home Assistant components to expose lots of entities and leave it to the user to ignore or disable the ones they don't think are useful. I could imagine a user doing something creative or useful with many of these! |
Ok, it's ready. I have only been able to test using the test packets from Leaf Spy and a single car trip, but apparently everything is working fine. |
Great work! Works well for me. Thanks for the legwork here. (I mean that literally, given that testing it requires getting in your car.) A few outstanding things that I want to address before merging. Feel free to take a crack at them, or I can get to them eventually.
|
Damn, you're demanding! 😂 No need to perfect this in a single PR! Anyway, here I go again.
|
Great! I'll test this later today, but it looks good. Thanks for your thoughts re: the wiper sensor and the sequence number. The reason I want to get all these fixes done is that, with the removal of the attributes, this will be a breaking change for the (tens of?) integration users. So I am hesitant to merge into the main branch or make a release until it's totally ready! But if you want to try to do the restoration work in a second PR, I get that. Once I can test this and confirm that the new changes work, I'll merge this PR into a (By the way—and maybe this is a conversation to save for that second PR—in looking through the branches just now, I see that the original integration author @jesserockz had been working in a separate branch on sensor entities, but didn't finish the work. Someone reported "hitting several issues immediately" with those changes, so your PR is probably farther along. I haven't tested his code or even noticed it until just now. But you could perhaps look to the code in that branch to see if the restoration functionality works.) |
Thanks! No worries, I understand and you're right. Tbh I don't know what's good practice in dev in Github, so happy to go along with your call. I will have a look at that other PR, but tbh looking at other code is not super helpful to me personally, as I cannot reproduce or see what is it exactly that makes it work. But yeah I can provide it to the AI and ask to use the key points. Will work on that when I can during the next few days and report on progress. |
Awesome, thanks! Yeah, how to handle partially-complete code is a judgment call. This is a relatively sleepy HACS integration, so people are probably comfortable with some measure of experimentation, but I'd like to have stable sensors before I push the release out to users (with a big "breaking change" warning). For the sensors, you could also try testing out the branch and seeing if the restoration works! |
They show unavailable after HA restart, and reappear after receiving data once again.