Skip to content

Commit

Permalink
[draytonwiser] Fix typos in log messages and class names (#9650)
Browse files Browse the repository at this point in the history
In some cases "DraytonWiser" was mis-spelled as "DraytonWise"

Signed-off-by: Andrew Schofield <the.uncle.fungus@gmail.com>
  • Loading branch information
andrew-schofield authored Jan 2, 2021
1 parent f540548 commit ac080ef
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected void startScan() {

@Override
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);
domainDTOProxy.getRooms().forEach(this::onRoomAdded);
domainDTOProxy.getRoomStats().forEach(r -> onRoomStatAdded(domainDTOProxy, r));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ abstract class DraytonWiserThingHandler<T> extends BaseThingHandler implements D

private @Nullable DraytonWiserApi api;
private @Nullable T data;
private @Nullable DraytonWiserDTO draytonWiseDTO;
private @Nullable DraytonWiserDTO draytonWiserDTO;
private @Nullable ScheduledFuture<?> handleCommandRefreshFuture;

protected DraytonWiserThingHandler(final Thing thing) {
Expand Down Expand Up @@ -120,11 +120,11 @@ public final void dispose() {
protected abstract void handleCommand(String channelId, Command command) throws DraytonWiserApiException;

@Override
public final void onRefresh(final DraytonWiserDTO draytonWiseDTO) {
this.draytonWiseDTO = draytonWiseDTO;
public final void onRefresh(final DraytonWiserDTO draytonWiserDTO) {
this.draytonWiserDTO = draytonWiserDTO;
try {
if (ThingHandlerHelper.isHandlerInitialized(this)) {
data = api == null ? null : collectData(draytonWiseDTO);
data = api == null ? null : collectData(draytonWiserDTO);
refresh();
if (data == null) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR,
Expand Down Expand Up @@ -162,11 +162,11 @@ protected void updateState(final String channelId, final Supplier<State> stateFu
* Returns the handler specific data object only if all data is available.
* 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
* @throws DraytonWiserApiException
*/
protected abstract @Nullable T collectData(DraytonWiserDTO draytonWiseDTO) throws DraytonWiserApiException;
protected abstract @Nullable T collectData(DraytonWiserDTO draytonWiserDTO) throws DraytonWiserApiException;

protected DraytonWiserApi getApi() {
final DraytonWiserApi api = this.api;
Expand All @@ -186,13 +186,13 @@ protected T getData() {
return data;
}

protected DraytonWiserDTO getDraytonWiseDTO() {
final DraytonWiserDTO draytonWiseDTO = this.draytonWiseDTO;
protected DraytonWiserDTO getDraytonWiserDTO() {
final DraytonWiserDTO draytonWiserDTO = this.draytonWiserDTO;

if (draytonWiseDTO == null) {
throw new IllegalStateException("DraytonWiseDTO not set");
if (draytonWiserDTO == null) {
throw new IllegalStateException("DraytonWiserDTO not set");
}
return draytonWiseDTO;
return draytonWiserDTO;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ public void refresh() {
if (getThing().getStatus() != ThingStatus.ONLINE) {
updateStatus(ThingStatus.ONLINE);
}
final DraytonWiserDTO draytonWiseDTO = new DraytonWiserDTO(domain);
final DraytonWiserDTO draytonWiserDTO = new DraytonWiserDTO(domain);

updateProperties(draytonWiseDTO);
notifyListeners(draytonWiseDTO);
updateProperties(draytonWiserDTO);
notifyListeners(draytonWiserDTO);
}
logger.debug("Finished refreshing devices");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void setSetPoint(final QuantityType<?> command) throws DraytonWiserApiEx

private State getHumidity() {
if (getData().getId() != null && getData().getRoomStatId() != null) {
final RoomStatDTO roomStat = getDraytonWiseDTO().getRoomStat(getData().getRoomStatId());
final RoomStatDTO roomStat = getDraytonWiserDTO().getRoomStat(getData().getRoomStatId());

if (roomStat != null) {
final Integer humidity = roomStat.getMeasuredHumidity();
Expand Down

0 comments on commit ac080ef

Please sign in to comment.