Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
DEV2DEV-DE committed Nov 29, 2023
1 parent ae8fbf2 commit 5d202d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ Connects to the Jablotron cloud to access your security system.
Currently the adapter is **read-only**! It's only possible to read the states. Switching will be implemented later!

## Changelog
### v0.0.2-beta.3 (2023-11-29)
* Ready for beta testing
### **WORK IN PROGRESS**
* Switched recurring refresh from interval to timeout
* Manage internal list of already created states

## References
* https://github.com/ioBroker/AdapterRequests/issues/755
Expand Down
8 changes: 4 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Jablotron extends utils.Adapter {

this.connected = false;
this.sessionId = '';
this.timeout = null;
this.timeout = undefined;
this.states = [];

axios.defaults.withCredentials = true; // force axios to use cookies
Expand All @@ -48,7 +48,7 @@ class Jablotron extends utils.Adapter {
* @returns {boolean} The connection status.
*/
get connected() {
return this._connected;
return this._connected || false;
}
/**
* Setter for the connected property.
Expand Down Expand Up @@ -151,7 +151,7 @@ class Jablotron extends utils.Adapter {

/**
* Recursively refreshes data at a specified interval.
* @returns {void}
* @returns {Promise<void>}
*/
async recurringRefresh() {
this.timeout = setTimeout(() => {
Expand Down Expand Up @@ -350,7 +350,7 @@ class Jablotron extends utils.Adapter {
*/
onUnload(callback) {
try {
this.clearTimeout(this.timeout);
if (this.timeout) this.clearTimeout(this.timeout);
this.connected = false;
callback();
} catch (e) {
Expand Down

0 comments on commit 5d202d5

Please sign in to comment.