Skip to content

Commit

Permalink
[netatmo] Consider setpoint duration when manual changing the setpoin…
Browse files Browse the repository at this point in the history
…t temperature (openhab#17662)

* setpointDefaultDuration was not always considered

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
  • Loading branch information
clinique authored and KaaNee committed Nov 8, 2024
1 parent f684da0 commit b2fa001
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
9 changes: 8 additions & 1 deletion bundles/org.openhab.binding.netatmo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,14 @@ All channels are read only.
| security | unknown-person-count | Number | Total number of unknown persons that are at home |
| security | unknown-person-picture | Image | Snapshot of unknown person that is at home |

**Supported trigger channels for the Security Home thing:**
**Supported channels for the Energy Home thing:**

| Channel Group | Channel Id | Item Type | Read/Write | Description |
| ------------- | ---------------------- | ----------- |----------- | --------------------------------------------------------- |
| energy | setpoint-duration | Number:Time | Read-only | Default duration of manual setpoint changes |
| energy | planning | String | Read-write | Planning currently applied when following weekly schedule |
| energy | mode | String | Read-write | Chosen thermostat mode (home, frost guard, manual, max) |
| energy | end | DateTime | Read-only | End time of the currently applied thermostat mode |

**Supported trigger channels for the Security Home, Presence and Doorbell thing:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ public void handleCommand(String channelName, Command command) {
}
api.setThermMode(energyId, targetMode.apiDescriptor);
break;
case CHANNEL_SETPOINT_DURATION:
logger.info("'{}' is a read-only channel that must be updated in the Netatmo App",
CHANNEL_SETPOINT_DURATION);
break;
}
handler.expireData();
} catch (NetatmoException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ protected List<NAObject> getFreshData(HomeApi api) {
List<NAObject> result = new ArrayList<>();
homeIds.stream().filter(id -> !id.isEmpty()).forEach(id -> {
try {
if (firstLaunch) {
HomeData homeData = api.getHomeData(id);
if (homeData != null) {
result.add(homeData);
HomeData homeData = api.getHomeData(id);
if (homeData != null) {
result.add(homeData);
if (featureAreas.isEmpty()) {
featureAreas.addAll(homeData.getFeatures());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ channel-group-type.netatmo.battery-extended.label = Battery
channel-group-type.netatmo.battery.label = Battery
channel-group-type.netatmo.energy.label = Home Energy
channel-group-type.netatmo.energy.channel.end.label = Mode End
channel-group-type.netatmo.energy.channel.end.description = End time of the currently applied setpoint.
channel-group-type.netatmo.energy.channel.end.description = End time of the currently applied thermostat mode.
channel-group-type.netatmo.humidity.label = Humidity
channel-group-type.netatmo.last-event-alarm.label = Last Event
channel-group-type.netatmo.last-event-alarm.channel.time.label = Event Timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
<label>Setpoint Duration</label>
<description>Default duration of manual setpoint changes.</description>
<category>Time</category>
<state pattern="%d %unit%" min="5" max="720" step="5"/>
<state pattern="%d %unit%" min="5" max="720" step="5" readOnly="true"/>
<autoUpdatePolicy>veto</autoUpdatePolicy>
</channel-type>

<channel-type id="floodlight-mode">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<channel id="mode" typeId="energy-mode"/>
<channel id="end" typeId="timestamp">
<label>Mode End</label>
<description>End time of the currently applied setpoint.</description>
<description>End time of the currently applied thermostat mode.</description>
</channel>
</channels>
</channel-group-type>
Expand Down

0 comments on commit b2fa001

Please sign in to comment.