mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-30 17:12:01 +01:00
spotless:apply
Signed-off-by: Laurent ARNAL <laurent@clae.net>
This commit is contained in:
parent
6e40ddfcf4
commit
6f8b6a621a
@ -81,5 +81,4 @@ public class LinkyBindingConstants {
|
|||||||
public static final String ENEDIS_ACCOUNT_URL = "https://mon-compte-particulier.enedis.fr/";
|
public static final String ENEDIS_ACCOUNT_URL = "https://mon-compte-particulier.enedis.fr/";
|
||||||
public static final String ENEDIS_AUTHORIZE_URL = ENEDIS_ACCOUNT_URL + "dataconnect/v1/oauth2/authorize";
|
public static final String ENEDIS_AUTHORIZE_URL = ENEDIS_ACCOUNT_URL + "dataconnect/v1/oauth2/authorize";
|
||||||
public static final String ENEDIS_API_TOKEN_URL = ENEDIS_ACCOUNT_URL + "token";
|
public static final String ENEDIS_API_TOKEN_URL = ENEDIS_ACCOUNT_URL + "token";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,6 @@ public class LinkyHandlerFactory extends BaseThingHandlerFactory implements Link
|
|||||||
LinkyBindingConstants.LINKY_AUTHORIZE_URL, clientId, clientSecret, LinkyBindingConstants.LINKY_SCOPES,
|
LinkyBindingConstants.LINKY_AUTHORIZE_URL, clientId, clientSecret, LinkyBindingConstants.LINKY_SCOPES,
|
||||||
true);
|
true);
|
||||||
this.authService.setLinkyAccountHandler(this);
|
this.authService.setLinkyAccountHandler(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -181,7 +180,6 @@ public class LinkyHandlerFactory extends BaseThingHandlerFactory implements Link
|
|||||||
|
|
||||||
return accessTokenResponse != null && accessTokenResponse.getAccessToken() != null
|
return accessTokenResponse != null && accessTokenResponse.getAccessToken() != null
|
||||||
&& accessTokenResponse.getRefreshToken() != null;
|
&& accessTokenResponse.getRefreshToken() != null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private @Nullable AccessTokenResponse getAccessTokenResponse() {
|
private @Nullable AccessTokenResponse getAccessTokenResponse() {
|
||||||
@ -288,7 +286,6 @@ public class LinkyHandlerFactory extends BaseThingHandlerFactory implements Link
|
|||||||
uri = uri + "&response_type=" + "code";
|
uri = uri + "&response_type=" + "code";
|
||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -308,5 +305,4 @@ public class LinkyHandlerFactory extends BaseThingHandlerFactory implements Link
|
|||||||
|
|
||||||
return result.toArray(new String[0]);
|
return result.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -35,5 +35,4 @@ public class AddressInfo {
|
|||||||
|
|
||||||
public String city;
|
public String city;
|
||||||
public String country;
|
public String country;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,4 @@ public class Customer {
|
|||||||
|
|
||||||
@SerializedName("usage_points")
|
@SerializedName("usage_points")
|
||||||
public UsagePoint[] usagePoints;
|
public UsagePoint[] usagePoints;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,4 @@ public class IntervalReading {
|
|||||||
|
|
||||||
@SerializedName("date")
|
@SerializedName("date")
|
||||||
public LocalDateTime date;
|
public LocalDateTime date;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -45,5 +45,4 @@ public class MeterReading {
|
|||||||
public IntervalReading[] weekValue;
|
public IntervalReading[] weekValue;
|
||||||
public IntervalReading[] monthValue;
|
public IntervalReading[] monthValue;
|
||||||
public IntervalReading[] yearValue;
|
public IntervalReading[] yearValue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,4 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
public class MeterResponse {
|
public class MeterResponse {
|
||||||
@SerializedName("meter_reading")
|
@SerializedName("meter_reading")
|
||||||
public MeterReading meterReading;
|
public MeterReading meterReading;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,11 +39,7 @@ import org.openhab.core.auth.client.oauth2.OAuthFactory;
|
|||||||
import org.openhab.core.config.core.Configuration;
|
import org.openhab.core.config.core.Configuration;
|
||||||
import org.openhab.core.i18n.LocaleProvider;
|
import org.openhab.core.i18n.LocaleProvider;
|
||||||
import org.openhab.core.library.types.QuantityType;
|
import org.openhab.core.library.types.QuantityType;
|
||||||
<<<<<<< HEAD
|
|
||||||
import org.openhab.core.library.unit.MetricPrefix;
|
|
||||||
=======
|
|
||||||
import org.openhab.core.library.types.StringType;
|
import org.openhab.core.library.types.StringType;
|
||||||
>>>>>>> 8179e0592f (some fixes on connectlinky page)
|
|
||||||
import org.openhab.core.library.unit.Units;
|
import org.openhab.core.library.unit.Units;
|
||||||
import org.openhab.core.thing.ChannelUID;
|
import org.openhab.core.thing.ChannelUID;
|
||||||
import org.openhab.core.thing.Thing;
|
import org.openhab.core.thing.Thing;
|
||||||
@ -594,10 +590,9 @@ public class LinkyHandler extends BaseThingHandler {
|
|||||||
if (meterReading.intervalReading.length == 0) {
|
if (meterReading.intervalReading.length == 0) {
|
||||||
throw new LinkyException("Invalid meterReading data: no day period");
|
throw new LinkyException("Invalid meterReading data: no day period");
|
||||||
}
|
}
|
||||||
if (meterReading.intervalReading.length != 1095) {
|
// if (meterReading.intervalReading.length != 1095) {
|
||||||
throw new LinkyException("Imcomplete meterReading data < 1095 days");
|
// throw new LinkyException("Imcomplete meterReading data < 1095 days");
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -687,5 +682,4 @@ public class LinkyHandler extends BaseThingHandler {
|
|||||||
public void saveConfiguration(Configuration config) {
|
public void saveConfiguration(Configuration config) {
|
||||||
updateConfiguration(config);
|
updateConfiguration(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,8 @@
|
|||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="token" type="text" required="false">
|
<parameter name="token" type="text" required="false">
|
||||||
<label>Token</label>
|
<label>Token</label>
|
||||||
<description>Your Enedis token (can be left empty, use the connection page to automatically fill it http://youopenhab/connectlinky)</description>
|
<description>Your Enedis token (can be left empty, use the connection page to automatically fill it
|
||||||
|
http://youopenhab/connectlinky)</description>
|
||||||
</parameter>
|
</parameter>
|
||||||
</config-description>
|
</config-description>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user