Skip to content

Commit

Permalink
fixes for Jacob review
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent ARNAL <[email protected]>
  • Loading branch information
lo92fr committed Feb 5, 2025
1 parent bd721b8 commit d43ab2a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ public void initialize() {
// update the timezone if not set to default to openhab default timezone
Configuration thingConfig = getConfig();

Object val = thingConfig.get("timezone");
if (val == null || "".equals(val)) {
String val = (String) thingConfig.get("timezone");
if (val == null || val.isBlank()) {
zoneId = this.timeZoneProvider.getTimeZone();
thingConfig.put("timezone", zoneId.getId());
} else {
zoneId = ZoneId.of((String) val);
zoneId = ZoneId.of(val);
}

updateConfiguration(thingConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ thing-type.config.linky.linky.internalAuthId.label = Auth ID
thing-type.config.linky.linky.internalAuthId.description = Authentication ID delivered after the captcha (see documentation).
thing-type.config.linky.linky.password.label = Password
thing-type.config.linky.linky.password.description = Your Enedis Password
thing-type.config.linky.linky.timezone.label = timezone
thing-type.config.linky.linky.timezone.description = The timezone associated with your Point of delivery. Will default to openHAB default timezone. You will need to change this if your Linky is located in a different timezone that your openHAB location. You can use an offset, or a label like Europe/Paris
thing-type.config.linky.linky.username.label = Username
thing-type.config.linky.linky.username.description = Your Enedis Username

Expand Down Expand Up @@ -41,6 +43,6 @@ channel-type.linky.power.label = Yesterday Peak Power
channel-type.linky.power.description = Maximum power usage yesterday
channel-type.linky.timestamp.label = Timestamp

# Thing status descriptions
# thing status descriptions

offline.config-error-mandatory-settings = Username, password and authId are mandatory.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
<parameter name="timezone" type="text" required="false">
<label>timezone</label>
<description>The timezone associated with your Point of delivery.
Will default to openhab default timezone.
Will default to openHAB default timezone.
You will
need to change this if your linky is located in a different timezone that your openhab location.
need to change this if your Linky is located in a different timezone that your openHAB location.
You can use an
offset, or a label like Europe/Paris</description>
</parameter>
Expand Down

0 comments on commit d43ab2a

Please sign in to comment.