| presence | Thing | NOC | The Netatmo Smart Outdoor Camera (Presence) camera with or without siren. | id, ipAddress |
| siren | Thing | NIS | The Netatmo Smart Indoor Siren. | id |
| doorbell | Thing | NDB | The Netatmo Smart Video Doorbell device. | id, ipAddress |
-| weather-station | Bridge | NAMain | Main indoor module reporting temperature, humidity, pressure, air quality and sound level. | id, refreshInterval |
+| weather-station | Bridge | NAMain | Main indoor module reporting temperature, humidity, pressure, air quality and sound level. | id |
| outdoor | Thing | NAModule1 | Outdoor module reporting temperature and humidity. | id |
| wind | Thing | NAModule2 | Wind sensor reporting wind angle and strength. | id |
| rain | Thing | NAModule3 | Rain Gauge measuring precipitation. | id |
| indoor | Thing | NAModule4 | Additional indoor module reporting temperature, humidity and CO2 level. | id |
-| home-coach | Thing | NHC | Healthy home coach reporting health-index, temperature, humidity, pressure, air quality, sound level. | id, refreshInterval |
+| home-coach | Thing | NHC | Healthy home coach reporting health-index, temperature, humidity, pressure, air quality, sound level. | id |
| plug | Thing | NAPlug | The relay connected to the boiler controlling a Thermostat and zero or more valves. | id |
| thermostat | Thing | NATherm1 | The Thermostat device placed in a given room. | id |
| room | Thing | NARoom | A room in your house. | id |
GROUP_DOORBELL_LIVE),
new ChannelGroup(EventCameraChannelHelper.class, GROUP_DOORBELL_LAST_EVENT, GROUP_DOORBELL_SUB_EVENT)),
- WEATHER_STATION(FeatureArea.WEATHER, "NAMain", 1, "configurable", ACCOUNT,
+ WEATHER_STATION(FeatureArea.WEATHER, "NAMain", 1, "device", ACCOUNT,
Set.of(DeviceCapability.class, WeatherCapability.class, MeasureCapability.class,
ChannelHelperCapability.class),
ChannelGroup.SIGNAL, ChannelGroup.HUMIDITY, ChannelGroup.TSTAMP_EXT, ChannelGroup.MEASURE,
ChannelGroup.TSTAMP_EXT, ChannelGroup.MEASURE, ChannelGroup.BATTERY, ChannelGroup.HUMIDITY,
ChannelGroup.TEMP_INSIDE_EXT, ChannelGroup.AIR_QUALITY),
- HOME_COACH(FeatureArea.AIR_CARE, "NHC", 1, "configurable", ACCOUNT,
+ HOME_COACH(FeatureArea.AIR_CARE, "NHC", 1, "device", ACCOUNT,
Set.of(DeviceCapability.class, AirCareCapability.class, MeasureCapability.class,
ChannelHelperCapability.class),
ChannelGroup.LOCATION, ChannelGroup.SIGNAL, ChannelGroup.NOISE, ChannelGroup.HUMIDITY,
</parameter>
</config-description>
- <config-description uri="netatmo:configurable">
- <parameter name="id" type="text" pattern="([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})" required="true">
- <label>@text/config.equipmentId.label</label>
- <description>@text/config.equipmentId.description</description>
- </parameter>
-
- <parameter name="refreshInterval" type="integer" min="20" unit="s">
- <label>@text/config.refreshInterval.label</label>
- <description>@text/config.refreshInterval.description</description>
- <default>180</default>
- </parameter>
- </config-description>
-
</config-description:config-descriptions>
--- /dev/null
+/**
+ * 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.netatmo.internal.api.data;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.openhab.binding.netatmo.internal.NetatmoBindingConstants.BINDING_ID;
+
+import java.net.URI;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.junit.jupiter.api.Test;
+
+/**
+ * @author Gaël L'hopital - Initial contribution
+ */
+@NonNullByDefault
+public class ModuleTypeTest {
+ public URI getConfigDescription(ModuleType mt) {
+ if (mt == ModuleType.WELCOME || mt == ModuleType.PRESENCE || mt == ModuleType.DOORBELL) {
+ // This did not exist prior to PR #16492
+ return URI.create(BINDING_ID + ":camera");
+ }
+ // This was previous method for calculating configuration URI
+ return URI.create(BINDING_ID + ":"
+ + (mt == ModuleType.ACCOUNT ? "api_bridge"
+ : mt == ModuleType.HOME ? "home"
+ : (mt.isLogical() ? "virtual"
+ : ModuleType.UNKNOWN == mt.getBridge() ? "configurable" : "device")));
+ }
+
+ @Test
+ public void checkConfigDescription() {
+ ModuleType.AS_SET.stream().forEach(mt -> {
+ if (mt != ModuleType.WELCOME) {
+ URI confDesc = mt.configDescription;
+ assertEquals(getConfigDescription(mt), confDesc);
+ }
+ });
+ }
+}