[draytonwiser] Fix typos in log messages and class names (#9650)
In some cases "DraytonWiser" was mis-spelled as "DraytonWise" Signed-off-by: Andrew Schofield <the.uncle.fungus@gmail.com>
This commit is contained in:
parent
f540548333
commit
ac080ef71d
@ -79,7 +79,7 @@ public class DraytonWiserDiscoveryService extends AbstractDiscoveryService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRefresh(final DraytonWiserDTO domainDTOProxy) {
|
public void onRefresh(final DraytonWiserDTO domainDTOProxy) {
|
||||||
logger.debug("Received data from Drayton Wise device. Parsing to discover devices.");
|
logger.debug("Received data from Drayton Wiser device. Parsing to discover devices.");
|
||||||
onControllerAdded(domainDTOProxy);
|
onControllerAdded(domainDTOProxy);
|
||||||
domainDTOProxy.getRooms().forEach(this::onRoomAdded);
|
domainDTOProxy.getRooms().forEach(this::onRoomAdded);
|
||||||
domainDTOProxy.getRoomStats().forEach(r -> onRoomStatAdded(domainDTOProxy, r));
|
domainDTOProxy.getRoomStats().forEach(r -> onRoomStatAdded(domainDTOProxy, r));
|
||||||
|
|||||||
@ -51,7 +51,7 @@ abstract class DraytonWiserThingHandler<T> extends BaseThingHandler implements D
|
|||||||
|
|
||||||
private @Nullable DraytonWiserApi api;
|
private @Nullable DraytonWiserApi api;
|
||||||
private @Nullable T data;
|
private @Nullable T data;
|
||||||
private @Nullable DraytonWiserDTO draytonWiseDTO;
|
private @Nullable DraytonWiserDTO draytonWiserDTO;
|
||||||
private @Nullable ScheduledFuture<?> handleCommandRefreshFuture;
|
private @Nullable ScheduledFuture<?> handleCommandRefreshFuture;
|
||||||
|
|
||||||
protected DraytonWiserThingHandler(final Thing thing) {
|
protected DraytonWiserThingHandler(final Thing thing) {
|
||||||
@ -120,11 +120,11 @@ abstract class DraytonWiserThingHandler<T> extends BaseThingHandler implements D
|
|||||||
protected abstract void handleCommand(String channelId, Command command) throws DraytonWiserApiException;
|
protected abstract void handleCommand(String channelId, Command command) throws DraytonWiserApiException;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void onRefresh(final DraytonWiserDTO draytonWiseDTO) {
|
public final void onRefresh(final DraytonWiserDTO draytonWiserDTO) {
|
||||||
this.draytonWiseDTO = draytonWiseDTO;
|
this.draytonWiserDTO = draytonWiserDTO;
|
||||||
try {
|
try {
|
||||||
if (ThingHandlerHelper.isHandlerInitialized(this)) {
|
if (ThingHandlerHelper.isHandlerInitialized(this)) {
|
||||||
data = api == null ? null : collectData(draytonWiseDTO);
|
data = api == null ? null : collectData(draytonWiserDTO);
|
||||||
refresh();
|
refresh();
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR,
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR,
|
||||||
@ -162,11 +162,11 @@ abstract class DraytonWiserThingHandler<T> extends BaseThingHandler implements D
|
|||||||
* Returns the handler specific data object only if all data is available.
|
* Returns the handler specific data object only if all data is available.
|
||||||
* If not all data is available it should return null.
|
* If not all data is available it should return null.
|
||||||
*
|
*
|
||||||
* @param draytonWiseDTO data object with domain data as received from the hub
|
* @param draytonWiserDTO data object with domain data as received from the hub
|
||||||
* @return handler data object if available else null
|
* @return handler data object if available else null
|
||||||
* @throws DraytonWiserApiException
|
* @throws DraytonWiserApiException
|
||||||
*/
|
*/
|
||||||
protected abstract @Nullable T collectData(DraytonWiserDTO draytonWiseDTO) throws DraytonWiserApiException;
|
protected abstract @Nullable T collectData(DraytonWiserDTO draytonWiserDTO) throws DraytonWiserApiException;
|
||||||
|
|
||||||
protected DraytonWiserApi getApi() {
|
protected DraytonWiserApi getApi() {
|
||||||
final DraytonWiserApi api = this.api;
|
final DraytonWiserApi api = this.api;
|
||||||
@ -186,13 +186,13 @@ abstract class DraytonWiserThingHandler<T> extends BaseThingHandler implements D
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DraytonWiserDTO getDraytonWiseDTO() {
|
protected DraytonWiserDTO getDraytonWiserDTO() {
|
||||||
final DraytonWiserDTO draytonWiseDTO = this.draytonWiseDTO;
|
final DraytonWiserDTO draytonWiserDTO = this.draytonWiserDTO;
|
||||||
|
|
||||||
if (draytonWiseDTO == null) {
|
if (draytonWiserDTO == null) {
|
||||||
throw new IllegalStateException("DraytonWiseDTO not set");
|
throw new IllegalStateException("DraytonWiserDTO not set");
|
||||||
}
|
}
|
||||||
return draytonWiseDTO;
|
return draytonWiserDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -115,10 +115,10 @@ public class HeatHubHandler extends BaseBridgeHandler {
|
|||||||
if (getThing().getStatus() != ThingStatus.ONLINE) {
|
if (getThing().getStatus() != ThingStatus.ONLINE) {
|
||||||
updateStatus(ThingStatus.ONLINE);
|
updateStatus(ThingStatus.ONLINE);
|
||||||
}
|
}
|
||||||
final DraytonWiserDTO draytonWiseDTO = new DraytonWiserDTO(domain);
|
final DraytonWiserDTO draytonWiserDTO = new DraytonWiserDTO(domain);
|
||||||
|
|
||||||
updateProperties(draytonWiseDTO);
|
updateProperties(draytonWiserDTO);
|
||||||
notifyListeners(draytonWiseDTO);
|
notifyListeners(draytonWiserDTO);
|
||||||
}
|
}
|
||||||
logger.debug("Finished refreshing devices");
|
logger.debug("Finished refreshing devices");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -118,7 +118,7 @@ public class RoomHandler extends DraytonWiserThingHandler<RoomDTO> {
|
|||||||
|
|
||||||
private State getHumidity() {
|
private State getHumidity() {
|
||||||
if (getData().getId() != null && getData().getRoomStatId() != null) {
|
if (getData().getId() != null && getData().getRoomStatId() != null) {
|
||||||
final RoomStatDTO roomStat = getDraytonWiseDTO().getRoomStat(getData().getRoomStatId());
|
final RoomStatDTO roomStat = getDraytonWiserDTO().getRoomStat(getData().getRoomStatId());
|
||||||
|
|
||||||
if (roomStat != null) {
|
if (roomStat != null) {
|
||||||
final Integer humidity = roomStat.getMeasuredHumidity();
|
final Integer humidity = roomStat.getMeasuredHumidity();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user