From: Jacob Laursen Date: Wed, 14 Aug 2024 13:06:04 +0000 (+0200) Subject: Fix typos (#17256) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=6218fc434a3c6d5ec0820c133cec2068113abcf3;p=openhab-addons.git Fix typos (#17256) Signed-off-by: Jacob Laursen --- diff --git a/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/TapoControlHandlerFactory.java b/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/TapoControlHandlerFactory.java index 0238678c34..fdb357bed3 100644 --- a/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/TapoControlHandlerFactory.java +++ b/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/TapoControlHandlerFactory.java @@ -24,7 +24,7 @@ import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.openhab.binding.tapocontrol.internal.devices.bridge.TapoBridgeHandler; import org.openhab.binding.tapocontrol.internal.devices.rf.smartcontact.TapoSmartContactHandler; -import org.openhab.binding.tapocontrol.internal.devices.rf.wheatersensor.TapoWheaterSensorHandler; +import org.openhab.binding.tapocontrol.internal.devices.rf.weathersensor.TapoWeatherSensorHandler; import org.openhab.binding.tapocontrol.internal.devices.wifi.TapoUniversalDeviceHandler; import org.openhab.binding.tapocontrol.internal.devices.wifi.bulb.TapoBulbHandler; import org.openhab.binding.tapocontrol.internal.devices.wifi.hub.TapoHubHandler; @@ -125,8 +125,8 @@ public class TapoControlHandlerFactory extends BaseThingHandlerFactory { return new TapoLightStripHandler(thing); } else if (SUPPORTED_SMART_CONTACTS.contains(thingTypeUID)) { return new TapoSmartContactHandler(thing); - } else if (SUPPORTED_WHEATHER_SENSORS.contains(thingTypeUID)) { - return new TapoWheaterSensorHandler(thing); + } else if (SUPPORTED_WEATHER_SENSORS.contains(thingTypeUID)) { + return new TapoWeatherSensorHandler(thing); } else if (thingTypeUID.equals(UNIVERSAL_THING_TYPE)) { return new TapoUniversalDeviceHandler(thing); } diff --git a/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/constants/TapoThingConstants.java b/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/constants/TapoThingConstants.java index 0286783a64..9bc5e1288f 100644 --- a/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/constants/TapoThingConstants.java +++ b/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/constants/TapoThingConstants.java @@ -100,13 +100,13 @@ public class TapoThingConstants { T315_THING_TYPE); public static final Set SUPPORTED_SMART_CONTACTS = Set.of(T110_THING_TYPE); public static final Set SUPPORTED_MOTION_SENSORS = Set.of(); - public static final Set SUPPORTED_WHEATHER_SENSORS = Set.of(T310_THING_TYPE, T315_THING_TYPE); + public static final Set SUPPORTED_WEATHER_SENSORS = Set.of(T310_THING_TYPE, T315_THING_TYPE); /*** SET OF ALL SUPPORTED THINGS ***/ public static final Set SUPPORTED_THING_TYPES_UIDS = Collections.unmodifiableSet(Stream .of(SUPPORTED_BRIDGE_UIDS, SUPPORTED_HUB_UIDS, SUPPORTED_SOCKET_UIDS, SUPPORTED_SOCKET_STRIP_UIDS, SUPPORTED_WHITE_BULB_UIDS, SUPPORTED_COLOR_BULB_UIDS, SUPPORTED_LIGHT_STRIP_UIDS, - SUPPORTED_SMART_CONTACTS, SUPPORTED_MOTION_SENSORS, SUPPORTED_WHEATHER_SENSORS) + SUPPORTED_SMART_CONTACTS, SUPPORTED_MOTION_SENSORS, SUPPORTED_WEATHER_SENSORS) .flatMap(Set::stream).collect(Collectors.toSet())); /*** THINGS WITH ENERGY DATA ***/ @@ -116,7 +116,7 @@ public class TapoThingConstants { public static final Set CHANNEL_GROUP_THING_SET = Collections.unmodifiableSet(Stream .of(SUPPORTED_BRIDGE_UIDS, SUPPORTED_HUB_UIDS, SUPPORTED_SOCKET_UIDS, SUPPORTED_SOCKET_STRIP_UIDS, SUPPORTED_WHITE_BULB_UIDS, SUPPORTED_COLOR_BULB_UIDS, SUPPORTED_LIGHT_STRIP_UIDS, - SUPPORTED_SMART_CONTACTS, SUPPORTED_MOTION_SENSORS, SUPPORTED_WHEATHER_SENSORS) + SUPPORTED_SMART_CONTACTS, SUPPORTED_MOTION_SENSORS, SUPPORTED_WEATHER_SENSORS) .flatMap(Set::stream).collect(Collectors.toSet())); public static final String CHILD_REPRESENTATION_PROPERTY = "serialNumber"; diff --git a/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/devices/rf/weathersensor/TapoWeatherSensorHandler.java b/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/devices/rf/weathersensor/TapoWeatherSensorHandler.java new file mode 100644 index 0000000000..3f53e15c79 --- /dev/null +++ b/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/devices/rf/weathersensor/TapoWeatherSensorHandler.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2010-2024 Contributors to the openHAB project + * + * See the NOTICE file(s) distributed with this work for additional + * information. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + */ +package org.openhab.binding.tapocontrol.internal.devices.rf.weathersensor; + +import static org.openhab.binding.tapocontrol.internal.constants.TapoThingConstants.*; +import static org.openhab.binding.tapocontrol.internal.helpers.utils.TypeUtils.*; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.openhab.binding.tapocontrol.internal.devices.dto.TapoChildDeviceData; +import org.openhab.binding.tapocontrol.internal.devices.rf.TapoChildDeviceHandler; +import org.openhab.core.library.unit.SIUnits; +import org.openhab.core.thing.Thing; + +/** + * TAPO Smart-Contact-Device. + * + * @author Christian Wild - Initial contribution + */ +@NonNullByDefault +public class TapoWeatherSensorHandler extends TapoChildDeviceHandler { + /** + * Constructor + * + * @param thing Thing object representing device + */ + public TapoWeatherSensorHandler(Thing thing) { + super(thing); + } + + /** + * Update properties + */ + @Override + protected void devicePropertiesChanged(TapoChildDeviceData deviceInfo) { + super.devicePropertiesChanged(deviceInfo); + + updateState(getChannelID(CHANNEL_GROUP_SENSOR, CHANNEL_TEMPERATURE), + getTemperatureType(deviceInfo.getTemperature(), SIUnits.CELSIUS)); + updateState(getChannelID(CHANNEL_GROUP_SENSOR, CHANNEL_HUMIDITY), getPercentType(deviceInfo.getHumidity())); + } +} diff --git a/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/devices/rf/wheatersensor/TapoWheaterSensorHandler.java b/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/devices/rf/wheatersensor/TapoWheaterSensorHandler.java deleted file mode 100644 index 2616b84eaa..0000000000 --- a/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/devices/rf/wheatersensor/TapoWheaterSensorHandler.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) 2010-2024 Contributors to the openHAB project - * - * See the NOTICE file(s) distributed with this work for additional - * information. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0 - * - * SPDX-License-Identifier: EPL-2.0 - */ -package org.openhab.binding.tapocontrol.internal.devices.rf.wheatersensor; - -import static org.openhab.binding.tapocontrol.internal.constants.TapoThingConstants.*; -import static org.openhab.binding.tapocontrol.internal.helpers.utils.TypeUtils.*; - -import org.eclipse.jdt.annotation.NonNullByDefault; -import org.openhab.binding.tapocontrol.internal.devices.dto.TapoChildDeviceData; -import org.openhab.binding.tapocontrol.internal.devices.rf.TapoChildDeviceHandler; -import org.openhab.core.library.unit.SIUnits; -import org.openhab.core.thing.Thing; - -/** - * TAPO Smart-Contact-Device. - * - * @author Christian Wild - Initial contribution - */ -@NonNullByDefault -public class TapoWheaterSensorHandler extends TapoChildDeviceHandler { - /** - * Constructor - * - * @param thing Thing object representing device - */ - public TapoWheaterSensorHandler(Thing thing) { - super(thing); - } - - /** - * Update properties - */ - @Override - protected void devicePropertiesChanged(TapoChildDeviceData deviceInfo) { - super.devicePropertiesChanged(deviceInfo); - - updateState(getChannelID(CHANNEL_GROUP_SENSOR, CHANNEL_TEMPERATURE), - getTemperatureType(deviceInfo.getTemperature(), SIUnits.CELSIUS)); - updateState(getChannelID(CHANNEL_GROUP_SENSOR, CHANNEL_HUMIDITY), getPercentType(deviceInfo.getHumidity())); - } -} diff --git a/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/helpers/utils/TapoUtils.java b/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/helpers/utils/TapoUtils.java index 604c175325..d008c53047 100644 --- a/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/helpers/utils/TapoUtils.java +++ b/bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/helpers/utils/TapoUtils.java @@ -172,7 +172,7 @@ public class TapoUtils { deviceLabel = DEVICE_DESCRIPTION_SMART_CONTACT; } else if (SUPPORTED_MOTION_SENSORS.contains(deviceUID)) { deviceLabel = DEVICE_DESCRIPTION_MOTION_SENSOR; - } else if (SUPPORTED_WHEATHER_SENSORS.contains(deviceUID)) { + } else if (SUPPORTED_WEATHER_SENSORS.contains(deviceUID)) { deviceLabel = DEVICE_DESCRIPTION_TEMP_SENSOR; } if (alias.length() > 0) { diff --git a/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/config/deviceconfig.xml b/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/config/deviceconfig.xml index 97a5ed26da..55e6af3fbb 100644 --- a/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/config/deviceconfig.xml +++ b/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/config/deviceconfig.xml @@ -29,8 +29,8 @@ - Refresh interval for refreshing the data in seconds (0=disabled). Set it below 10 seconds may cause - communication issues (not recommed). + Refresh interval for refreshing the data in seconds (0=disabled). Setting it below 10 seconds may cause + communication issues (not recommended). 30 true diff --git a/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/config/hubconfig.xml b/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/config/hubconfig.xml index 48fd34801c..2647d7c6b0 100644 --- a/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/config/hubconfig.xml +++ b/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/config/hubconfig.xml @@ -29,8 +29,8 @@ - Refresh interval for refreshing hub informations in seconds (0=disabled). Set it below 10 seconds may - cause communication issues (not recommed). + Refresh interval for refreshing hub informations in seconds (0=disabled). Setting it below 10 seconds + may cause communication issues (not recommended). 10 true diff --git a/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/i18n/tapocontrol.properties b/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/i18n/tapocontrol.properties index 2feb90018f..7ca6c81a2e 100644 --- a/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/i18n/tapocontrol.properties +++ b/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/i18n/tapocontrol.properties @@ -62,7 +62,7 @@ bridge-type.config.tapo.hub.httpPort.label = Port bridge-type.config.tapo.hub.httpPort.description = HTTP-Communication Port (default 80) bridge-type.config.tapo.hub.ipAddress.label = IP Address bridge-type.config.tapo.hub.pollingInterval.label = Refresh Interval -bridge-type.config.tapo.hub.pollingInterval.description = Refresh interval for refreshing hub informations in seconds (0=disabled). Set it below 10 seconds may cause communication issues (not recommed). +bridge-type.config.tapo.hub.pollingInterval.description = Refresh interval for refreshing hub informations in seconds (0=disabled). Setting it below 10 seconds may cause communication issues (not recommended). bridge-type.config.tapo.hub.protocol.label = Protocol bridge-type.config.tapo.hub.protocol.description = Communication Protocol bridge-type.config.tapo.hub.protocol.option. = Direct HTTP @@ -72,7 +72,7 @@ thing-type.config.tapo.device.httpPort.label = Port thing-type.config.tapo.device.httpPort.description = HTTP-Communication Port (default 80) thing-type.config.tapo.device.ipAddress.label = IP Address thing-type.config.tapo.device.pollingInterval.label = Refresh Interval -thing-type.config.tapo.device.pollingInterval.description = Refresh interval for refreshing the data in seconds (0=disabled). Set it below 10 seconds may cause communication issues (not recommed). +thing-type.config.tapo.device.pollingInterval.description = Refresh interval for refreshing the data in seconds (0=disabled). Setting it below 10 seconds may cause communication issues (not recommended). thing-type.config.tapo.device.protocol.label = Protocol thing-type.config.tapo.device.protocol.description = Communication Protocol thing-type.config.tapo.device.protocol.option. = Direct HTTP @@ -117,7 +117,7 @@ channel-group-type.tapocontrol.smartHubAlarms.label = Smart Hub Alarms channel-group-type.tapocontrol.smartHubAlarms.description = Tapo Smart Hub Alarms channel-group-type.tapocontrol.smartPlug.label = SmartPlug channel-group-type.tapocontrol.smartPlug.description = Tapo Smart Plug Power Outlet -channel-group-type.tapocontrol.temperatureSensor.label = Wheater Sensor +channel-group-type.tapocontrol.temperatureSensor.label = Weather Sensor channel-group-type.tapocontrol.temperatureSensor.description = Temperature and Humidity Sensor Channels # channel types @@ -282,7 +282,7 @@ channel-type.tapocontrol.effectOn.description = Switches the lightning effect on # error messages -error-api-unknown-com-error = recieived unknown com error(9999) +error-api-unknown-com-error = received unknown com error (9999) error-api-account = received account error (-2101) error-api-aes-decode-fail = aes decode failed (-1005) error-api-antitheft-conflict = device antitheft conflict (-2002) diff --git a/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/thing/channelgroups.xml b/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/thing/channelgroups.xml index 624be0bf2a..6a6c79a2e4 100644 --- a/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/thing/channelgroups.xml +++ b/bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/thing/channelgroups.xml @@ -137,7 +137,7 @@ - + Temperature and Humidity Sensor Channels