iobroker.poolcontrol 0.4.0-alpha → 0.4.0-alpha.1

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/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "poolcontrol",
4
- "version": "0.4.0",
4
+ "version": "0.4.0-alpha.0",
5
5
  "news": {
6
6
  "0.4.0": {
7
7
  "en": "Added daily temperature statistics under analytics.statistics.temperature.today with automatic min/max/average tracking, JSON and HTML summaries, and midnight reset logic.",
@@ -118,6 +118,13 @@ const pumpHelper = {
118
118
  if (this.deviceId && id === this.deviceId) {
119
119
  const val = !!state.val;
120
120
  const current = (await this.adapter.getStateAsync('pump.pump_switch'))?.val;
121
+
122
+ // NEU: Filter gegen zyklische Fremdmeldungen ohne echten Zustandswechsel
123
+ if (current === val) {
124
+ this.adapter.log.debug('[pumpHelper] Fremd-State meldet identischen Wert – ignoriert.');
125
+ return;
126
+ }
127
+
121
128
  if (current !== val) {
122
129
  await this.adapter.setStateAsync('pump.pump_switch', { val, ack: true });
123
130
  await this._updateStatus();
@@ -68,12 +68,19 @@ const timeHelper = {
68
68
  });
69
69
  }
70
70
 
71
- // Pumpe über die echte Steckdosen-ID schalten
72
- await this.adapter.setForeignStateAsync(pumpSwitchId, {
73
- val: shouldRun,
74
- ack: false,
75
- });
76
- this.adapter.log.debug(`[timeHelper] Pumpe ${shouldRun ? 'EIN' : 'AUS'} (${hhmm})`);
71
+ // --- NEU: nur schalten, wenn sich der Zustand wirklich ändert ---
72
+ const currentState = (await this.adapter.getForeignStateAsync(pumpSwitchId))?.val;
73
+ if (currentState !== shouldRun) {
74
+ await this.adapter.setForeignStateAsync(pumpSwitchId, {
75
+ val: shouldRun,
76
+ ack: false,
77
+ });
78
+ this.adapter.log.debug(`[timeHelper] Pumpe ${shouldRun ? 'EIN' : 'AUS'} (${hhmm})`);
79
+ } else {
80
+ this.adapter.log.debug(
81
+ `[timeHelper] Keine Änderung (${hhmm}) – Zustand bleibt ${shouldRun ? 'EIN' : 'AUS'}.`,
82
+ );
83
+ }
77
84
  } catch (err) {
78
85
  this.adapter.log.warn(`[timeHelper] Fehler im Check: ${err.message}`);
79
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.poolcontrol",
3
- "version": "0.4.0-alpha",
3
+ "version": "0.4.0-alpha.1",
4
4
  "description": "Steuerung & Automatisierung für den Pool (Pumpe, Heizung, Ventile, Sensoren).",
5
5
  "author": "DasBo1975 <dasbo1975@outlook.de>",
6
6
  "homepage": "https://github.com/DasBo1975/ioBroker.poolcontrol",