Thanks – I’ve put in a pull request. Very simply change, but fixed the issue for me (probably lucky as this is the first time I’ve ever looked at Python code!)
If I start to free up some time, I might see if I can get my head around how Addons work. Ideally, the integration would expose a sensor for each camera, with states to reflect “No Motion” or “Motion Detected”. Can then easily write automations based on those states.
Cheers
Kane
From: CamectChao <ch...@camect.com>
Sent: Tuesday, 16 February 2021 3:20 AM
To: Camect User Forum <fo...@camect.com>
Cc: Kane <ka...@bullen.org>
Subject: Re: Home Assistant Integration - anyone else with two camect devices?
Please send a pull request. I'll approve it once I see it.
On Friday, February 12, 2021 at 7:09:32 AM UTC-8 Kane wrote:
OK, looks like I can answer my own question.
Found the issue with the code (in __init__.py) The event listener was being added outside the loop, which means it was only being applied to the last unit.
If I move add_event_listener call in, this addresses the issue - both camect units are now reporting events.
Now, how do I go about getting the official code (and/or the HACS repository) updated with the corrected code?