Closed twehrmaker closed 6 years ago
@twehrmaker I'm not convinced that Accessory.devices will necessarily be fully populated by this stage. It depends whether observeDevices() will guarantee to wait until all the events have fired before resolving.
I need to do further testing and also to update the underlying libraries. So please don't think I'm ignoring your PR, it's simply that I don't have time for this project for the next week or so.
Thanks for your interest,
@twehrmaker I have not implemented this your way for backward compatibility reason.
However, I think that a way to get an array of all the devices is valuable so have implemented:
tradfri.devices
to return an array. This is live in version 3.3.0.
Please let me know if this does not solve your issue and thank you for your contribution.
With this pull request the observed devices will be returned in addition to the credentials after establishing the connection. Please advice if there is another proposed way to retrieve a list of devices.