-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Add door tag to Netatmo #135772
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
base: dev
Are you sure you want to change the base?
Add door tag to Netatmo #135772
Conversation
This change enable initial definition to add door tag of Netatmo. Let's kick of discussion adding door tag handling beyond webhooks.
Hey there @cgtobi, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I told you via email to open a PR, but I thought you already had something working rather than just kicking off a discussion. I think Discord is better for that then :)
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
I made a good progress but it is still not ready. While I ellaborating a new door_tag.py (more complex than binary sensor) I discovered that something here and there to be added. I'm gona add that file next some time. Sorry but I've just try to reverse engineer HA definitions and this intengration in the last month (as many time I have). A discussion could boost this. I on discord (farkasdi.) for your invite. |
Please join the HA discord and send me a message, I can't seem to find you :) |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Thanks for the reminder! :) |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Hi. I've stuck some times ago, while I troubleshoot the new code. I think most of the stuff there but was not working. My original thought was to invoke device addition for door tags but it was not happened. Then I tried to change to root of the tags to camera (idea behind that tags are the child objects of camera) but this modification in editor not propagated to my core code fork. Seems it was a missing update here. I retry. |
did you have a look at this PR ? #121401 |
Thanks Ardien! Appreciated to have more professional to look it! I just get some idea to tune the code but maybe tomorrow I can do that. May I add you to see where I'm now? I'm a bit new and I don't get to share anything yet. This is the repo if you try to navigate: https://github.com/farkasdi/core |
Hi @adriencog ! I've checked the PR you linked that adds doortag to binary_sensor.py . My approach to have it as binary_sensor (@joostlek advice as well) but in separate file (door_tag.py) and to be added alike indoor modules (with battery) in data_handler.py. No calibration functionality. Keep plain as much as possible and without processing webhooks (have the status from homestatus in 60 secs). I've made the tuning I planned yesterday as I crosschecked the code with Gemini (Copilot can be next step). Today when I tested the result in container still not added the tags. I'm a bit disappointed. If you have some idea please let me know. |
@farkasdi I think I get why, your code is never run. Indeed, Solution could be to call door tag setup in from . import door_tag
...
async def async_setup_entry( ...
...
await door_tag.async_setup_entry(hass, entry, async_add_entities)
... Not sure that's the cleanest way to do, but at least with this, you can test your new entities |
Yes, you are right pointing it out. I should have tune it yesterday, I got to that. However I would put plain binary_sensor and that may not proper still. Ok, I think about. Thanks! |
In order for this to be mergable, we should integrate it in binary sensor |
This change enable initial definition to add door tag of Netatmo. Let's kick of discussion adding door tag handling beyond webhooks.
Breaking change
Proposed change
This addition would enable this type of device handling as other Netatmo devices beyond webhook. Plus enable other HACS like Battery Notes to follow battery drainage/replacement.
More precisely this change targeting to add opening_type device of Netatmo. In vendor terminology called door/window tag. By configuration in vendow app it can be: door, windows, garage, gate, cupboard, other
In HA this should be a device where binary entity of similar type. DOOR, WINDOW, GARAGE_DOOR (not all vendor defined type exists, to be decided how to handle delta).
The device type is connected to camera via RF and operated by battery (those entities like other Netatmo devices) are present in homesdate and homestate (intergtation) need to be processed.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: