]> git.basschouten.com Git - openhab-addons.git/commitdiff
Fix typos (#17256)
authorJacob Laursen <jacob-github@vindvejr.dk>
Wed, 14 Aug 2024 13:06:04 +0000 (15:06 +0200)
committerGitHub <noreply@github.com>
Wed, 14 Aug 2024 13:06:04 +0000 (15:06 +0200)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/TapoControlHandlerFactory.java
bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/constants/TapoThingConstants.java
bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/devices/rf/weathersensor/TapoWeatherSensorHandler.java [new file with mode: 0644]
bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/devices/rf/wheatersensor/TapoWheaterSensorHandler.java [deleted file]
bundles/org.openhab.binding.tapocontrol/src/main/java/org/openhab/binding/tapocontrol/internal/helpers/utils/TapoUtils.java
bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/config/deviceconfig.xml
bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/config/hubconfig.xml
bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/i18n/tapocontrol.properties
bundles/org.openhab.binding.tapocontrol/src/main/resources/OH-INF/thing/channelgroups.xml

index 0238678c349226a55e0fe4e5a8ed77160f054b41..fdb357bed38255510ffb51c162cf0ca0b4ee5c0a 100644 (file)
@@ -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);
         }
index 0286783a64c849651506a7d9d169e5f7b5b56a1a..9bc5e1288f6d4a1eb2d95f04a959a1a80f0be070 100644 (file)
@@ -100,13 +100,13 @@ public class TapoThingConstants {
             T315_THING_TYPE);
     public static final Set<ThingTypeUID> SUPPORTED_SMART_CONTACTS = Set.of(T110_THING_TYPE);
     public static final Set<ThingTypeUID> SUPPORTED_MOTION_SENSORS = Set.of();
-    public static final Set<ThingTypeUID> SUPPORTED_WHEATHER_SENSORS = Set.of(T310_THING_TYPE, T315_THING_TYPE);
+    public static final Set<ThingTypeUID> SUPPORTED_WEATHER_SENSORS = Set.of(T310_THING_TYPE, T315_THING_TYPE);
 
     /*** SET OF ALL SUPPORTED THINGS ***/
     public static final Set<ThingTypeUID> 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<ThingTypeUID> 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 (file)
index 0000000..3f53e15
--- /dev/null
@@ -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 (file)
index 2616b84..0000000
+++ /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()));
-    }
-}
index 604c175325607e0081003aca97661a41cea83ccf..d008c53047d7f16afc5216440fb4851439b5e0d9 100644 (file)
@@ -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) {
index 97a5ed26dae982f21ab46916d9d19af7e16cca40..55e6af3fbb93a1bd12111618b2e6e3749607787c 100644 (file)
@@ -29,8 +29,8 @@
                </parameter>
                <parameter name="pollingInterval" type="integer" min="0" max="9999" required="false">
                        <label>Refresh Interval</label>
-                       <description>Refresh interval for refreshing the data in seconds (0=disabled). Set it below 10 seconds may cause
-                               communication issues (not recommed).</description>
+                       <description>Refresh interval for refreshing the data in seconds (0=disabled). Setting it below 10 seconds may cause
+                               communication issues (not recommended).</description>
                        <default>30</default>
                        <advanced>true</advanced>
                </parameter>
index 48fd34801ca7ddd71268f8b12bba11fb04d68fe2..2647d7c6b049d944a7862de463b7895375939f7e 100644 (file)
@@ -29,8 +29,8 @@
                </parameter>
                <parameter name="pollingInterval" type="integer" min="0" max="9999" required="false">
                        <label>Refresh Interval</label>
-                       <description>Refresh interval for refreshing hub informations in seconds (0=disabled). Set it below 10 seconds may
-                               cause communication issues (not recommed).</description>
+                       <description>Refresh interval for refreshing hub informations in seconds (0=disabled). Setting it below 10 seconds
+                               may cause communication issues (not recommended).</description>
                        <default>10</default>
                        <advanced>true</advanced>
                </parameter>
index 2feb90018f7b614cba67a1ef0331ae9505b16b03..7ca6c81a2ea634e3f9e5d2b002039e4775e71fd3 100644 (file)
@@ -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)
index 624be0bf2ac4fb9cb22fd45aa705fa38df343f37..6a6c79a2e49d4c689f89116eccf1deaaccd2b647 100644 (file)
 
        <!-- Temperature Sensor -->
        <channel-group-type id="temperatureSensor">
-               <label>Wheater Sensor</label>
+               <label>Weather Sensor</label>
                <description>Temperature and Humidity Sensor Channels</description>
                <channels>
                        <channel id="currentTemp" typeId="temperatureChannel"></channel>