homey-api 3.5.2 → 3.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AthomCloudAPI.js +4 -2
- package/package.json +1 -1
package/lib/AthomCloudAPI.js
CHANGED
|
@@ -125,6 +125,8 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
|
|
|
125
125
|
* @returns {Promise<boolean>}
|
|
126
126
|
*/
|
|
127
127
|
async isLoggedIn() {
|
|
128
|
+
if (this.__token && this.__token.access_token) return true;
|
|
129
|
+
|
|
128
130
|
const store = await this.__getStore();
|
|
129
131
|
|
|
130
132
|
if (!store.token || !store.token.access_token) return false;
|
|
@@ -152,7 +154,7 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
|
|
|
152
154
|
api: this,
|
|
153
155
|
properties: properties,
|
|
154
156
|
});
|
|
155
|
-
|
|
157
|
+
|
|
156
158
|
return this.__user;
|
|
157
159
|
}
|
|
158
160
|
|
|
@@ -296,7 +298,7 @@ for(const {@link HomeyAPIV2.ManagerDevices.Device device} of Object.values(devic
|
|
|
296
298
|
/*
|
|
297
299
|
* API overloads
|
|
298
300
|
*/
|
|
299
|
-
|
|
301
|
+
|
|
300
302
|
// eslint-disable-next-line no-unused-vars
|
|
301
303
|
async onCallRequestHeaders({ request }) {
|
|
302
304
|
// Try to set the Token from the StorageAdapter
|