Skip to content

Commit

Permalink
removed debug output regarding pet position
Browse files Browse the repository at this point in the history
updated version to 1.0.5
  • Loading branch information
Sickbart committed Apr 25, 2021
1 parent 143ec4f commit 77916d3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ The picture of the cat flap, hub and smartphone app is provided free to use from

## Changelog

### 1.0.5 (2021-04-25)
* (Sickboy78) fixed bug in case pets didn't have a position (e.g. no flaps, only feeder in use)

### 1.0.4 (2021-03-07)
* (Sickboy78) added state curfew_active for pet flap devices
* (Sickboy78) fixed normalization of device names
Expand Down
4 changes: 2 additions & 2 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"common": {
"name": "sureflap",
"version": "1.0.4",
"version": "1.0.5",
"news": {
"1.0.4": {
"1.0.5": {
"en": "initial release",
"de": "Erstveröffentlichung",
"ru": "Начальная версия",
Expand Down
5 changes: 1 addition & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class Sureflap extends utils.Adapter {
* starts loading data from the surepet API
*/
startLoadingData() {
this.log.debug(`starting SureFlap Adapter v1.0.4.d`);
this.log.debug(`starting SureFlap Adapter v1.0.5`);
clearTimeout(this.timerId);
this.doAuthenticate()
.then(() => this.getHouseholdFromApi())
Expand Down Expand Up @@ -387,7 +387,6 @@ class Sureflap extends utils.Adapter {
const name = this.sureFlapState.pets[i].name;
const household_name = this.getHouseholdNameForId(this.sureFlapState.pets[i].household_id);
const prefix = household_name + '.pets';
this.log.debug(`reading pet position of ${name} @ getPets()`);
if('position' in this.sureFlapState.pets[i]) {
const where = this.sureFlapState.pets[i].position.where;
const since = this.sureFlapState.pets[i].position.since;
Expand Down Expand Up @@ -778,7 +777,6 @@ class Sureflap extends utils.Adapter {
setPetStatusWithPositionToAdapter(prefix, name, where, since, petIndex) {
this.setPetStatusToAdapter(prefix, name, petIndex);
const obj_name = prefix + '.' + name;
this.log.debug(`reading previous pet position of ${name} @ setPetStatusWithPositionToAdapter()`);
if (!this.sureFlapStatePrev.pets || !('position' in this.sureFlapStatePrev.pets[petIndex]) || (where !== this.sureFlapStatePrev.pets[petIndex].position.where) || (since !== this.sureFlapStatePrev.pets[petIndex].position.since)) {
this.setState(obj_name + '.inside', (where == 1) ? true : false, true);
this.setState(obj_name + '.since', since, true);
Expand Down Expand Up @@ -865,7 +863,6 @@ class Sureflap extends utils.Adapter {
*/
resetPetInsideToAdapter(hierarchy, pet) {
const petIndex = this.getPetIndex(pet);
this.log.debug(`reading previous pet position of ${pet} @ resetPetInsideToAdapter()`);
if('position' in this.sureFlapStatePrev.pets[petIndex]) {
const value = this.sureFlapStatePrev.pets[petIndex].position.where;
this.log.debug(`resetting pet inside for ${pet} to: ${value}`);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.sureflap",
"version": "1.0.4",
"version": "1.0.5",
"description": "Adpater für Sureflap Katzen- und Haustierklappen von Sure Petcare",
"author": {
"name": "Sickboy78",
Expand Down

0 comments on commit 77916d3

Please sign in to comment.