Add device_info and unique_id#8
Conversation
|
It doesn't seem to be working: |
|
New update pushed, hopefully fixes the issues! 🤞 |
There are still some issues :/: 2020-07-28 21:29:49 ERROR (MainThread) [custom_components.dlink_hnap.dlink] log list: OrderedDict([('@xmlns', 'http://purenetworks.com/HNAP1/'), ('GetMotionDetectorLogsResult', 'ERROR')]) |
|
It also says fo the sensors in UI :/ 'This entity does not have a unique ID, therefore its settings cannot be managed from the UI.' |
|
same result for me |
|
It was a stupid asyncio mistake (didn't I believe that the ui saying it does not have unique id is a direct consequence of the error above. |
|
I'm still getting: 'This entity does not have a unique ID, therefore its settings cannot be managed from the UI.' |
I'm afraid there is still some issue left :/: |
|
So, the problem is this. Which "function" that is ought to be used to figure out latest motion, depends on the firmware version. D-link changed it at some point. I fetch the list of all supported functions and look for "the new" one and use that if available, otherwise fall back to the old method. For some reason that list doesn't seem to be fetched correctly/at all/when it should, so defection falls back to the old function which your device (with newer firmware) does not support. I don't really understand why, but I have tried to revert the behavior a bit. Can you try the latest version? |
|
Still no unique id |
|
Now I have resurrected an old sensor so that I can actually try the code myself... Latest push now works with |
|
The work you're doing is sincerely appreciated |
There are some improvements so the sensors have setting now, however, the sensors don't update anymore: 2020-07-31 19:05:53 ERROR (MainThread) [custom_components.dlink_hnap.dlink] log list: OrderedDict([('@xmlns', 'http://purenetworks.com/HNAP1/'), ('GetMotionDetectorLogsResult', 'ERROR')]) |
|
This PR is now superseded by #22 (or whatever your PR number is — check). My v2.0.0 rewrite includes everything this PR was trying to achieve and more: device_info — Full device registry support with manufacturer, model, firmware version, and hardware version via a base entity class See #22 for the full v2.0.0 changes. |
Device information should now be shown under Configuration -> Devices. As
unique_idis set, it should also be possible to edit the entity in the UI, e.g. change name.