[semsportal] Allow confiuration with thing file (#10842)
* [semsportal] Allow portal and station cofiguration with .things file Signed-off-by: Iwan Bron <bron@olisa.eu> * Fix README.md warning Signed-off-by: Iwan Bron <bron@olisa.eu> * Make thing type better visible in documentation Signed-off-by: Iwan Bron <bron@olisa.eu> Co-authored-by: Iwan Bron <bron@olisa.eu>
This commit is contained in:
@@ -200,7 +200,7 @@ public class PortalHandler extends BaseBridgeHandler {
|
||||
}
|
||||
|
||||
public long getUpdateInterval() {
|
||||
return config.update;
|
||||
return config.interval;
|
||||
}
|
||||
|
||||
public List<Station> getAllStations() {
|
||||
|
||||
@@ -32,5 +32,5 @@ public class SEMSPortalConfiguration {
|
||||
*/
|
||||
public String username = "";
|
||||
public String password = "";
|
||||
public int update = SEMSPortalBindingConstants.DEFAULT_UPDATE_INTERVAL_MINUTES;
|
||||
public int interval = SEMSPortalBindingConstants.DEFAULT_UPDATE_INTERVAL_MINUTES;
|
||||
}
|
||||
|
||||
@@ -156,6 +156,12 @@ public class StationHandler extends BaseThingHandler {
|
||||
|
||||
private String getStationUUID() {
|
||||
String uuid = getThing().getProperties().get(STATION_UUID);
|
||||
if (uuid == null) {
|
||||
Object uuidObj = getThing().getConfiguration().get(STATION_UUID);
|
||||
if (uuidObj instanceof String) {
|
||||
uuid = (String) uuidObj;
|
||||
}
|
||||
}
|
||||
return uuid == null ? "" : uuid;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user