mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
[homeassistant] Split Home Assistant from MQTT binding (#19496)
* [mqtt] Collapse mqtt.generic into mqtt Signed-off-by: Cody Cutrer <cody@cutrer.us>
This commit is contained in:
+1
-2
@@ -163,6 +163,7 @@
|
||||
/bundles/org.openhab.binding.heliosventilation/ @ramack
|
||||
/bundles/org.openhab.binding.heos/ @Wire82
|
||||
/bundles/org.openhab.binding.herzborg/ @Sonic-Amiga
|
||||
/bundles/org.openhab.binding.homeassistant/ @antroids @ccutrer
|
||||
/bundles/org.openhab.binding.homeconnect/ @bruestel
|
||||
/bundles/org.openhab.binding.homematic/ @FStolte @gerrieg @mdicke2s
|
||||
/bundles/org.openhab.binding.homewizard/ @Daniel-42
|
||||
@@ -257,8 +258,6 @@
|
||||
/bundles/org.openhab.binding.mqtt.awtrixlight/ @DrRSatzteil
|
||||
/bundles/org.openhab.binding.mqtt.espmilighthub/ @Skinah
|
||||
/bundles/org.openhab.binding.mqtt.fpp/ @computergeek1507
|
||||
/bundles/org.openhab.binding.mqtt.generic/ @ccutrer
|
||||
/bundles/org.openhab.binding.mqtt.homeassistant/ @antroids @ccutrer
|
||||
/bundles/org.openhab.binding.mqtt.homie/ @ccutrer
|
||||
/bundles/org.openhab.binding.mqtt.ruuvigateway/ @ssalonen
|
||||
/bundles/org.openhab.binding.mspa/ @weymann
|
||||
|
||||
@@ -801,6 +801,11 @@
|
||||
<artifactId>org.openhab.binding.herzborg</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.binding.homeassistant</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.binding.homeconnect</artifactId>
|
||||
@@ -1266,16 +1271,6 @@
|
||||
<artifactId>org.openhab.binding.mqtt.espmilighthub</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.binding.mqtt.generic</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.binding.mqtt.homeassistant</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.binding.mqtt.homie</artifactId>
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
# Home Assistant MQTT Components Binding
|
||||
|
||||
NOTE: This binding is provided by the [MQTT binding](https://www.openhab.org/addons/bindings/mqtt/), and therefore no explicit installation is necessary beyond installing the MQTT binding.
|
||||
# Home Assistant Binding
|
||||
|
||||
Devices that use [Home Assistant MQTT Discovery](https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery) are automatically configured with this binding.
|
||||
Components that share a common `device.identifiers` will automatically be grouped together as a single Thing.
|
||||
+15
-8
@@ -10,9 +10,9 @@
|
||||
<version>5.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>org.openhab.binding.mqtt.homeassistant</artifactId>
|
||||
<artifactId>org.openhab.binding.homeassistant</artifactId>
|
||||
|
||||
<name>openHAB Add-ons :: Bundles :: MQTT HomeAssistant Convention</name>
|
||||
<name>openHAB Add-ons :: Bundles :: Home Assistant Binding</name>
|
||||
|
||||
<properties>
|
||||
<!-- define a property to overwrite it on Windows, as venv has a different structure -->
|
||||
@@ -26,12 +26,6 @@
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.binding.mqtt.generic</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Graal Polyglot Framework -->
|
||||
<dependency>
|
||||
@@ -185,6 +179,19 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.karaf.tooling</groupId>
|
||||
<artifactId>karaf-maven-plugin</artifactId>
|
||||
<version>${karaf.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>karaf-feature-verification</id>
|
||||
<!-- disabled for the per-bundle build due to cross-binding reference to MQTT -->
|
||||
<!-- it will be verified in features/openhab-addons/pom.xml -->
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
+4
-7
@@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<features name="org.openhab.binding.mqtt.homeassistant-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
|
||||
<features name="org.openhab.binding.homeassistant-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
|
||||
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
|
||||
|
||||
<!-- ATTENTION: When modifying this feature, you must also update features/openhab-addons/src/main/resources/footer.xml -->
|
||||
<feature name="openhab-binding-mqtt-homeassistant" description="MQTT Binding Homeassistant" version="${project.version}">
|
||||
<feature name="openhab-binding-homeassistant" description="Home Assistant Binding" version="${project.version}">
|
||||
<feature>openhab-runtime-base</feature>
|
||||
<feature>openhab-transport-mqtt</feature>
|
||||
<feature>openhab-binding-mqtt</feature>
|
||||
<feature dependency="true">openhab.tp-commons-net</feature>
|
||||
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.llvm.llvm-api/25.0.1</bundle>
|
||||
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.polyglot.polyglot/25.0.1</bundle>
|
||||
@@ -25,9 +24,7 @@
|
||||
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.truffle.truffle-compiler/25.0.1</bundle>
|
||||
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.truffle.truffle-nfi/25.0.1</bundle>
|
||||
<bundle dependency="true">mvn:org.openhab.osgiify/org.graalvm.truffle.truffle-runtime/25.0.1</bundle>
|
||||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.mqtt/${project.version}</bundle>
|
||||
<bundle start-level="81">mvn:org.openhab.addons.bundles/org.openhab.binding.mqtt.generic/${project.version}</bundle>
|
||||
<bundle start-level="82">mvn:org.openhab.addons.bundles/org.openhab.binding.mqtt.homeassistant/${project.version}</bundle>
|
||||
<bundle start-level="81">mvn:org.openhab.addons.bundles/org.openhab.binding.homeassistant/${project.version}</bundle>
|
||||
</feature>
|
||||
|
||||
</features>
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@@ -19,11 +19,11 @@ import java.util.function.Predicate;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.component.AbstractComponent;
|
||||
import org.openhab.binding.mqtt.generic.ChannelConfigBuilder;
|
||||
import org.openhab.binding.mqtt.generic.ChannelState;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.Value;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.component.AbstractComponent;
|
||||
import org.openhab.core.config.core.Configuration;
|
||||
import org.openhab.core.io.transport.mqtt.MqttBrokerConnection;
|
||||
import org.openhab.core.thing.Channel;
|
||||
+14
-15
@@ -10,10 +10,9 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.mqtt.homeassistant.generic.internal.MqttBindingConstants;
|
||||
import org.openhab.core.thing.type.ChannelTypeUID;
|
||||
|
||||
/**
|
||||
@@ -23,23 +22,23 @@ import org.openhab.core.thing.type.ChannelTypeUID;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public enum ComponentChannelType {
|
||||
COLOR("ha-color"),
|
||||
DIMMER("ha-dimmer"),
|
||||
IMAGE("ha-image"),
|
||||
LOCATION("ha-location"),
|
||||
NUMBER("ha-number"),
|
||||
ROLLERSHUTTER("ha-rollershutter"),
|
||||
STRING("ha-string"),
|
||||
SWITCH("ha-switch"),
|
||||
TRIGGER("ha-trigger"),
|
||||
HUMIDITY("ha-humidity"),
|
||||
GPS_ACCURACY("ha-gps-accuracy"),
|
||||
TEMPERATURE("ha-temperature");
|
||||
COLOR("color"),
|
||||
DIMMER("dimmer"),
|
||||
IMAGE("image"),
|
||||
LOCATION("location"),
|
||||
NUMBER("number"),
|
||||
ROLLERSHUTTER("rollershutter"),
|
||||
STRING("string"),
|
||||
SWITCH("switch"),
|
||||
TRIGGER("trigger"),
|
||||
HUMIDITY("humidity"),
|
||||
GPS_ACCURACY("gps-accuracy"),
|
||||
TEMPERATURE("temperature");
|
||||
|
||||
final ChannelTypeUID channelTypeUID;
|
||||
|
||||
ComponentChannelType(String id) {
|
||||
channelTypeUID = new ChannelTypeUID(MqttBindingConstants.BINDING_ID, id);
|
||||
channelTypeUID = new ChannelTypeUID(HomeAssistantBindingConstants.BINDING_ID, id);
|
||||
}
|
||||
|
||||
public ChannelTypeUID getChannelTypeUID() {
|
||||
+5
-5
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.HashSet;
|
||||
@@ -23,13 +23,13 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.component.AbstractComponent;
|
||||
import org.openhab.binding.homeassistant.internal.component.ComponentFactory;
|
||||
import org.openhab.binding.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.binding.homeassistant.internal.exception.UnsupportedComponentException;
|
||||
import org.openhab.binding.mqtt.generic.AvailabilityTracker;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.utils.FutureCollector;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.component.AbstractComponent;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.component.ComponentFactory;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.UnsupportedComponentException;
|
||||
import org.openhab.core.i18n.UnitProvider;
|
||||
import org.openhab.core.io.transport.mqtt.MqttBrokerConnection;
|
||||
import org.openhab.core.io.transport.mqtt.MqttMessageSubscriber;
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
+8
-5
@@ -10,22 +10,25 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.generic.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.core.thing.ThingTypeUID;
|
||||
|
||||
/**
|
||||
* The {@link MqttBindingConstants} class defines common constants, which are
|
||||
* The {@link HomeAssistantBindingConstants} class defines common constants, which are
|
||||
* used across the whole binding.
|
||||
*
|
||||
* @author David Graeff - Initial contribution
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class MqttBindingConstants {
|
||||
public class HomeAssistantBindingConstants {
|
||||
|
||||
public static final String BINDING_ID = "mqtt";
|
||||
public static final String LEGACY_BINDING_ID = "mqtt";
|
||||
public static final String BINDING_ID = "homeassistant";
|
||||
|
||||
// List of all Thing Type UIDs
|
||||
public static final ThingTypeUID HOMEASSISTANT_MQTT_THING = new ThingTypeUID(BINDING_ID, "homeassistant");
|
||||
public static final ThingTypeUID LEGACY_MQTT_HOMEASSISTANT_THING = new ThingTypeUID(LEGACY_BINDING_ID,
|
||||
"homeassistant");
|
||||
public static final ThingTypeUID HOMEASSISTANT_DEVICE_THING = new ThingTypeUID(BINDING_ID, "device");
|
||||
}
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.function.Predicate;
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
@@ -19,7 +19,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.PolyglotException;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.component.AbstractComponent;
|
||||
import org.openhab.binding.homeassistant.internal.component.AbstractComponent;
|
||||
import org.openhab.core.thing.binding.generic.ChannelTransformation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
/**
|
||||
* Provides the configured and static settings for the Homekit addon
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
@@ -29,7 +29,7 @@ import org.graalvm.polyglot.PolyglotException;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.graalvm.python.embedding.GraalPyResources;
|
||||
import org.graalvm.python.embedding.VirtualFileSystem;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.binding.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.core.OpenHAB;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.mqtt.generic.MqttChannelStateDescriptionProvider;
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal;
|
||||
package org.openhab.binding.homeassistant.internal;
|
||||
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.LogRecord;
|
||||
+2
-2
@@ -10,11 +10,11 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.actions;
|
||||
package org.openhab.binding.homeassistant.internal.actions;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.handler.HomeAssistantThingHandler;
|
||||
import org.openhab.binding.homeassistant.internal.handler.HomeAssistantThingHandler;
|
||||
import org.openhab.core.automation.annotation.RuleAction;
|
||||
import org.openhab.core.thing.binding.ThingActions;
|
||||
import org.openhab.core.thing.binding.ThingActionsScope;
|
||||
+13
-13
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
@@ -27,23 +27,23 @@ import javax.measure.quantity.Temperature;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.HaID;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantBindingConstants;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantChannelTransformation;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.homeassistant.internal.component.ComponentFactory.ComponentContext;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.AbstractComponentConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.Availability;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.AvailabilityMode;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.AvailabilityTracker;
|
||||
import org.openhab.binding.mqtt.generic.ChannelState;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.MqttChannelStateDescriptionProvider;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.generic.values.Value;
|
||||
import org.openhab.binding.mqtt.homeassistant.generic.internal.MqttBindingConstants;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HaID;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantChannelTransformation;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.component.ComponentFactory.ComponentContext;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.AbstractComponentConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.Availability;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.AvailabilityMode;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.core.config.core.Configuration;
|
||||
import org.openhab.core.io.transport.mqtt.MqttBrokerConnection;
|
||||
import org.openhab.core.library.unit.ImperialUnits;
|
||||
@@ -416,7 +416,7 @@ public abstract class AbstractComponent<C extends AbstractComponentConfiguration
|
||||
}
|
||||
|
||||
private ChannelGroupTypeUID getChannelGroupTypeUID(String prefix) {
|
||||
return new ChannelGroupTypeUID(MqttBindingConstants.BINDING_ID, prefix + "_" + uniqueId);
|
||||
return new ChannelGroupTypeUID(HomeAssistantBindingConstants.BINDING_ID, prefix + "_" + uniqueId);
|
||||
}
|
||||
|
||||
public boolean mergeable(AbstractComponent<?> other) {
|
||||
+3
-3
@@ -10,14 +10,14 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.core.library.types.HSBType;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.library.types.PercentType;
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -19,9 +19,9 @@ import java.util.Map;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
|
||||
/**
|
||||
* A MQTT alarm control panel, following the https://www.home-assistant.io/components/alarm_control_panel.mqtt/
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
@@ -19,14 +19,14 @@ import java.util.Objects;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.mapping.ColorMode;
|
||||
import org.openhab.binding.mqtt.generic.values.ColorValue;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.PercentageValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.core.library.types.DecimalType;
|
||||
import org.openhab.core.library.types.HSBType;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
+6
-6
@@ -10,20 +10,20 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.ROConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.listener.ExpireUpdateStateListener;
|
||||
import org.openhab.binding.homeassistant.internal.listener.OffDelayUpdateStateListener;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.Value;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.ROConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.listener.ExpireUpdateStateListener;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.listener.OffDelayUpdateStateListener;
|
||||
import org.openhab.core.thing.type.AutoUpdatePolicy;
|
||||
|
||||
/**
|
||||
+3
-3
@@ -10,16 +10,16 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.core.thing.type.AutoUpdatePolicy;
|
||||
|
||||
/**
|
||||
+3
-3
@@ -10,15 +10,15 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.values.ImageValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
|
||||
/**
|
||||
* A MQTT camera, following the https://www.home-assistant.io/components/camera.mqtt/ specification.
|
||||
+4
-4
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
@@ -22,13 +22,13 @@ import java.util.stream.Collectors;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.NumberValue;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
|
||||
/**
|
||||
+6
-6
@@ -10,18 +10,18 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.homeassistant.internal.HaID;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantChannelLinkageChecker;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.binding.homeassistant.internal.exception.UnsupportedComponentException;
|
||||
import org.openhab.binding.mqtt.generic.AvailabilityTracker;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HaID;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantChannelLinkageChecker;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.UnsupportedComponentException;
|
||||
import org.openhab.core.i18n.UnitProvider;
|
||||
import org.openhab.core.thing.ThingUID;
|
||||
|
||||
+4
-4
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
@@ -18,11 +18,11 @@ import java.util.Map;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.values.RollershutterValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.core.library.types.StopMoveType;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.core.library.types.UpDownType;
|
||||
+4
-4
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
@@ -19,14 +19,14 @@ import java.util.Objects;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.LocationValue;
|
||||
import org.openhab.binding.mqtt.generic.values.NumberValue;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.core.library.types.DecimalType;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.library.types.PointType;
|
||||
+5
-5
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -19,11 +19,11 @@ import java.util.stream.Stream;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.AbstractComponentConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.AbstractComponentConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.ConfigurationException;
|
||||
|
||||
/**
|
||||
* A MQTT Device Trigger, following the https://www.home-assistant.io/integrations/device_trigger.mqtt/ specification.
|
||||
+5
-5
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -18,12 +18,12 @@ import java.util.Map;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantChannelTransformation;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.ROConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantChannelTransformation;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.ROConfiguration;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.types.Command;
|
||||
import org.openhab.core.types.State;
|
||||
+5
-5
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -20,14 +20,14 @@ import java.util.Objects;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.PercentageValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.library.types.PercentType;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
+4
-4
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -19,12 +19,12 @@ import java.util.Map;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.values.NumberValue;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.MathContext;
|
||||
@@ -20,12 +20,12 @@ import java.util.Set;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.PercentageValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.core.library.types.DecimalType;
|
||||
import org.openhab.core.library.types.HSBType;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
+5
-5
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -19,16 +19,16 @@ import java.util.Objects;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.exception.UnsupportedComponentException;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.mapping.ColorMode;
|
||||
import org.openhab.binding.mqtt.generic.values.ColorValue;
|
||||
import org.openhab.binding.mqtt.generic.values.NumberValue;
|
||||
import org.openhab.binding.mqtt.generic.values.PercentageValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.UnsupportedComponentException;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.types.Command;
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
+4
-4
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
@@ -18,12 +18,12 @@ import java.util.Map;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
+4
-4
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
@@ -18,10 +18,10 @@ import java.util.Map;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.values.NumberValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.core.types.util.UnitUtils;
|
||||
|
||||
/**
|
||||
+5
-5
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -19,12 +19,12 @@ import java.util.TreeMap;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.binding.mqtt.generic.ChannelState;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.core.thing.type.AutoUpdatePolicy;
|
||||
import org.openhab.core.types.Command;
|
||||
+4
-4
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -18,10 +18,10 @@ import java.util.Map;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.RWConfiguration;
|
||||
|
||||
/**
|
||||
* A MQTT select, following the https://www.home-assistant.io/components/select.mqtt/ specification.
|
||||
+5
-5
@@ -10,21 +10,21 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.ROConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.listener.ExpireUpdateStateListener;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.NumberValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.generic.values.Value;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.ROConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.listener.ExpireUpdateStateListener;
|
||||
import org.openhab.core.types.util.UnitUtils;
|
||||
|
||||
/**
|
||||
+4
-4
@@ -10,17 +10,17 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.RWConfiguration;
|
||||
|
||||
/**
|
||||
* A MQTT switch, following the https://www.home-assistant.io/components/switch.mqtt/ specification.
|
||||
+3
-3
@@ -10,16 +10,16 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.AbstractComponentConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.AbstractComponentConfiguration;
|
||||
|
||||
/**
|
||||
* A MQTT Tag scanner, following the https://www.home-assistant.io/integrations/tag.mqtt/ specification.
|
||||
+5
-5
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
@@ -20,14 +20,14 @@ import java.util.Objects;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantChannelTransformation;
|
||||
import org.openhab.binding.homeassistant.internal.exception.UnsupportedComponentException;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.PercentageValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantChannelTransformation;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.UnsupportedComponentException;
|
||||
import org.openhab.core.library.types.DecimalType;
|
||||
import org.openhab.core.library.types.HSBType;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
+4
-4
@@ -10,17 +10,17 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.RWConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.RWConfiguration;
|
||||
|
||||
/**
|
||||
* A MQTT select, following the https://www.home-assistant.io/integrations/text.mqtt/ specification.
|
||||
+5
-5
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -20,12 +20,12 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.ROConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.ROConfiguration;
|
||||
import org.openhab.core.io.transport.mqtt.MqttBrokerConnection;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
+4
-4
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -19,13 +19,13 @@ import java.util.Map;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.PercentageValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.generic.values.Value;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannel;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
|
||||
/**
|
||||
* A MQTT vacuum, following the https://www.home-assistant.io/components/vacuum.mqtt/ specification.
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
@@ -23,12 +23,12 @@ import java.util.Objects;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.PercentageValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.core.library.types.DecimalType;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.library.types.PercentType;
|
||||
+4
-4
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.component;
|
||||
package org.openhab.binding.homeassistant.internal.component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
@@ -22,12 +22,12 @@ import java.util.stream.Collectors;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.binding.mqtt.generic.values.NumberValue;
|
||||
import org.openhab.binding.mqtt.generic.values.OnOffValue;
|
||||
import org.openhab.binding.mqtt.generic.values.TextValue;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.ComponentChannelType;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.EntityConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.ConfigurationException;
|
||||
|
||||
/**
|
||||
* A MQTT Humidifier, following the https://www.home-assistant.io/integrations/water_heater.mqtt/ specification.
|
||||
+2
-2
@@ -10,13 +10,13 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config;
|
||||
package org.openhab.binding.homeassistant.internal.config;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.Connection;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.Connection;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config;
|
||||
package org.openhab.binding.homeassistant.internal.config;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config.dto;
|
||||
package org.openhab.binding.homeassistant.internal.config.dto;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.List;
|
||||
@@ -19,7 +19,7 @@ import java.util.Map;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.graalvm.polyglot.Value;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.util.UIDUtils;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config.dto;
|
||||
package org.openhab.binding.homeassistant.internal.config.dto;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config.dto;
|
||||
package org.openhab.binding.homeassistant.internal.config.dto;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config.dto;
|
||||
package org.openhab.binding.homeassistant.internal.config.dto;
|
||||
|
||||
/**
|
||||
* controls the conditions needed to set the entity to available
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config.dto;
|
||||
package org.openhab.binding.homeassistant.internal.config.dto;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
+2
-2
@@ -10,10 +10,10 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config.dto;
|
||||
package org.openhab.binding.homeassistant.internal.config.dto;
|
||||
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.ConnectionDeserializer;
|
||||
import org.openhab.binding.homeassistant.internal.config.ConnectionDeserializer;
|
||||
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config.dto;
|
||||
package org.openhab.binding.homeassistant.internal.config.dto;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config.dto;
|
||||
package org.openhab.binding.homeassistant.internal.config.dto;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config.dto;
|
||||
package org.openhab.binding.homeassistant.internal.config.dto;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.config.dto;
|
||||
package org.openhab.binding.homeassistant.internal.config.dto;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
+10
-9
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.discovery;
|
||||
package org.openhab.binding.homeassistant.internal.discovery;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Collections;
|
||||
@@ -27,16 +27,16 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.HaID;
|
||||
import org.openhab.binding.homeassistant.internal.HandlerConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantBindingConstants;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.homeassistant.internal.config.dto.AbstractComponentConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.binding.mqtt.discovery.AbstractMQTTDiscovery;
|
||||
import org.openhab.binding.mqtt.discovery.MQTTTopicDiscoveryService;
|
||||
import org.openhab.binding.mqtt.generic.MqttChannelTypeProvider;
|
||||
import org.openhab.binding.mqtt.homeassistant.generic.internal.MqttBindingConstants;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HaID;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HandlerConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.config.dto.AbstractComponentConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.core.config.core.ConfigurableService;
|
||||
import org.openhab.core.config.core.Configuration;
|
||||
import org.openhab.core.config.discovery.DiscoveryResult;
|
||||
@@ -153,7 +153,8 @@ public class HomeAssistantDiscovery extends AbstractMQTTDiscovery {
|
||||
new String(payload, StandardCharsets.UTF_8));
|
||||
|
||||
final String thingID = config.getThingId(haID.objectID);
|
||||
final ThingUID thingUID = new ThingUID(MqttBindingConstants.HOMEASSISTANT_MQTT_THING, bridgeUID, thingID);
|
||||
final ThingUID thingUID = new ThingUID(HomeAssistantBindingConstants.HOMEASSISTANT_DEVICE_THING, bridgeUID,
|
||||
thingID);
|
||||
|
||||
// Build properties and DiscoveryResult outside the lock
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.exception;
|
||||
package org.openhab.binding.homeassistant.internal.exception;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.exception;
|
||||
package org.openhab.binding.homeassistant.internal.exception;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
|
||||
+27
-20
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.handler;
|
||||
package org.openhab.binding.homeassistant.internal.handler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
@@ -27,24 +27,24 @@ import java.util.function.Consumer;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.DiscoverComponents;
|
||||
import org.openhab.binding.homeassistant.internal.DiscoverComponents.ComponentDiscovered;
|
||||
import org.openhab.binding.homeassistant.internal.HaID;
|
||||
import org.openhab.binding.homeassistant.internal.HandlerConfiguration;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantBindingConstants;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantChannelLinkageChecker;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.homeassistant.internal.actions.HomeAssistantUpdateThingActions;
|
||||
import org.openhab.binding.homeassistant.internal.component.AbstractComponent;
|
||||
import org.openhab.binding.homeassistant.internal.component.ComponentFactory;
|
||||
import org.openhab.binding.homeassistant.internal.component.Update;
|
||||
import org.openhab.binding.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.binding.mqtt.generic.AbstractMQTTThingHandler;
|
||||
import org.openhab.binding.mqtt.generic.ChannelState;
|
||||
import org.openhab.binding.mqtt.generic.MqttChannelStateDescriptionProvider;
|
||||
import org.openhab.binding.mqtt.generic.MqttChannelTypeProvider;
|
||||
import org.openhab.binding.mqtt.generic.tools.DelayedBatchProcessing;
|
||||
import org.openhab.binding.mqtt.generic.utils.FutureCollector;
|
||||
import org.openhab.binding.mqtt.homeassistant.generic.internal.MqttBindingConstants;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.DiscoverComponents;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.DiscoverComponents.ComponentDiscovered;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HaID;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HandlerConfiguration;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantChannelLinkageChecker;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.actions.HomeAssistantUpdateThingActions;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.component.AbstractComponent;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.component.ComponentFactory;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.component.Update;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.exception.ConfigurationException;
|
||||
import org.openhab.core.config.core.Configuration;
|
||||
import org.openhab.core.i18n.UnitProvider;
|
||||
import org.openhab.core.io.transport.mqtt.MqttBrokerConnection;
|
||||
@@ -184,7 +184,8 @@ public class HomeAssistantThingHandler extends AbstractMQTTThingHandler
|
||||
try {
|
||||
AbstractComponent<?> component = ComponentFactory.createComponent(thingUID, haID,
|
||||
channelConfigurationJSON, this, this, this, scheduler, gson, python, unitProvider);
|
||||
if (typeID.equals(MqttBindingConstants.HOMEASSISTANT_MQTT_THING)) {
|
||||
if (typeID.equals(HomeAssistantBindingConstants.HOMEASSISTANT_DEVICE_THING)
|
||||
|| typeID.equals(HomeAssistantBindingConstants.LEGACY_MQTT_HOMEASSISTANT_THING)) {
|
||||
typeID = calculateThingTypeUID(component);
|
||||
}
|
||||
|
||||
@@ -313,7 +314,8 @@ public class HomeAssistantThingHandler extends AbstractMQTTThingHandler
|
||||
synchronized (haComponents) { // sync whenever discoverComponents is started
|
||||
ThingTypeUID typeID = getThing().getThingTypeUID();
|
||||
for (AbstractComponent<?> discovered : discoveredComponentsList) {
|
||||
if (typeID.equals(MqttBindingConstants.HOMEASSISTANT_MQTT_THING)) {
|
||||
if (typeID.equals(HomeAssistantBindingConstants.HOMEASSISTANT_DEVICE_THING)
|
||||
|| typeID.equals(HomeAssistantBindingConstants.LEGACY_MQTT_HOMEASSISTANT_THING)) {
|
||||
typeID = calculateThingTypeUID(discovered);
|
||||
}
|
||||
AbstractComponent<?> known = haComponentsByUniqueId.get(discovered.getUniqueId());
|
||||
@@ -398,10 +400,14 @@ public class HomeAssistantThingHandler extends AbstractMQTTThingHandler
|
||||
|
||||
private boolean updateThingType(ThingTypeUID typeID) {
|
||||
// if this is a dynamic type, then we update the type
|
||||
if (!MqttBindingConstants.HOMEASSISTANT_MQTT_THING.equals(typeID)) {
|
||||
var thingTypeBuilder = channelTypeProvider.derive(typeID, MqttBindingConstants.HOMEASSISTANT_MQTT_THING);
|
||||
if (!HomeAssistantBindingConstants.HOMEASSISTANT_DEVICE_THING.equals(typeID)
|
||||
&& !HomeAssistantBindingConstants.LEGACY_MQTT_HOMEASSISTANT_THING.equals(typeID)) {
|
||||
var thingTypeBuilder = channelTypeProvider.derive(typeID,
|
||||
HomeAssistantBindingConstants.HOMEASSISTANT_DEVICE_THING);
|
||||
|
||||
if (getThing().getThingTypeUID().equals(MqttBindingConstants.HOMEASSISTANT_MQTT_THING)) {
|
||||
if (getThing().getThingTypeUID().equals(HomeAssistantBindingConstants.HOMEASSISTANT_DEVICE_THING)
|
||||
|| getThing().getThingTypeUID()
|
||||
.equals(HomeAssistantBindingConstants.LEGACY_MQTT_HOMEASSISTANT_THING)) {
|
||||
logger.debug("Migrating Home Assistant thing {} from generic type to dynamic type {}",
|
||||
getThing().getUID(), typeID);
|
||||
|
||||
@@ -445,8 +451,9 @@ public class HomeAssistantThingHandler extends AbstractMQTTThingHandler
|
||||
}
|
||||
|
||||
private ThingTypeUID calculateThingTypeUID(AbstractComponent<?> component) {
|
||||
return new ThingTypeUID(MqttBindingConstants.BINDING_ID, MqttBindingConstants.HOMEASSISTANT_MQTT_THING.getId()
|
||||
+ "_" + component.getConfig().getThingId(component.getHaID().objectID));
|
||||
return new ThingTypeUID(HomeAssistantBindingConstants.BINDING_ID,
|
||||
HomeAssistantBindingConstants.HOMEASSISTANT_DEVICE_THING.getId() + "_"
|
||||
+ component.getConfig().getThingId(component.getHaID().objectID));
|
||||
}
|
||||
|
||||
@Override
|
||||
+30
-13
@@ -10,19 +10,20 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.generic.internal;
|
||||
package org.openhab.binding.homeassistant.internal.handler;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantBindingConstants;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.homeassistant.internal.HomeAssistantStateDescriptionProvider;
|
||||
import org.openhab.binding.mqtt.generic.MqttChannelStateDescriptionProvider;
|
||||
import org.openhab.binding.mqtt.generic.MqttChannelTypeProvider;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantPythonBridge;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.HomeAssistantStateDescriptionProvider;
|
||||
import org.openhab.binding.mqtt.homeassistant.internal.handler.HomeAssistantThingHandler;
|
||||
import org.openhab.core.i18n.UnitProvider;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.thing.ThingTypeUID;
|
||||
@@ -30,6 +31,7 @@ import org.openhab.core.thing.binding.BaseThingHandlerFactory;
|
||||
import org.openhab.core.thing.binding.ThingHandler;
|
||||
import org.openhab.core.thing.binding.ThingHandlerFactory;
|
||||
import org.openhab.core.thing.type.ChannelTypeRegistry;
|
||||
import org.openhab.core.thing.type.ThingTypeBuilder;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
@@ -37,14 +39,14 @@ import org.osgi.service.component.annotations.Reference;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
/**
|
||||
* The {@link MqttThingHandlerFactory} is responsible for creating things and thing
|
||||
* The {@link HomeAssistantThingHandlerFactory} is responsible for creating things and thing
|
||||
* handlers.
|
||||
*
|
||||
* @author David Graeff - Initial contribution
|
||||
*/
|
||||
@Component(service = ThingHandlerFactory.class)
|
||||
@NonNullByDefault
|
||||
public class MqttThingHandlerFactory extends BaseThingHandlerFactory {
|
||||
public class HomeAssistantThingHandlerFactory extends BaseThingHandlerFactory {
|
||||
private final MqttChannelTypeProvider typeProvider;
|
||||
private final MqttChannelStateDescriptionProvider stateDescriptionProvider;
|
||||
private final ChannelTypeRegistry channelTypeRegistry;
|
||||
@@ -52,11 +54,12 @@ public class MqttThingHandlerFactory extends BaseThingHandlerFactory {
|
||||
private final Gson gson;
|
||||
private final HomeAssistantPythonBridge python;
|
||||
|
||||
private static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Stream
|
||||
.of(MqttBindingConstants.HOMEASSISTANT_MQTT_THING).collect(Collectors.toSet());
|
||||
private static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(
|
||||
HomeAssistantBindingConstants.HOMEASSISTANT_DEVICE_THING,
|
||||
HomeAssistantBindingConstants.LEGACY_MQTT_HOMEASSISTANT_THING);
|
||||
|
||||
@Activate
|
||||
public MqttThingHandlerFactory(final @Reference MqttChannelTypeProvider typeProvider,
|
||||
public HomeAssistantThingHandlerFactory(final @Reference MqttChannelTypeProvider typeProvider,
|
||||
final @Reference HomeAssistantStateDescriptionProvider stateDescriptionProvider,
|
||||
final @Reference ChannelTypeRegistry channelTypeRegistry, final @Reference UnitProvider unitProvider,
|
||||
final @Reference HomeAssistantPythonBridge python) {
|
||||
@@ -66,6 +69,17 @@ public class MqttThingHandlerFactory extends BaseThingHandlerFactory {
|
||||
this.unitProvider = unitProvider;
|
||||
this.gson = new Gson();
|
||||
this.python = python;
|
||||
|
||||
try {
|
||||
// build the thing type
|
||||
ThingTypeBuilder builder = ThingTypeBuilder.instance("homeassistant", "device", "Home Assistant Device");
|
||||
builder.withConfigDescriptionURI(new URI("thing-type:homeassistant:device"))
|
||||
.withSupportedBridgeTypeUIDs(List.of("mqtt:broker"));
|
||||
|
||||
this.typeProvider.putThingType(builder.build());
|
||||
} catch (URISyntaxException e) {
|
||||
// can't happen
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,8 +88,11 @@ public class MqttThingHandlerFactory extends BaseThingHandlerFactory {
|
||||
}
|
||||
|
||||
private boolean isHomeassistantDynamicType(ThingTypeUID thingTypeUID) {
|
||||
return MqttBindingConstants.BINDING_ID.equals(thingTypeUID.getBindingId())
|
||||
&& thingTypeUID.getId().startsWith(MqttBindingConstants.HOMEASSISTANT_MQTT_THING.getId());
|
||||
return HomeAssistantBindingConstants.LEGACY_BINDING_ID.equals(thingTypeUID.getBindingId())
|
||||
&& thingTypeUID.getId()
|
||||
.startsWith(HomeAssistantBindingConstants.LEGACY_MQTT_HOMEASSISTANT_THING.getId())
|
||||
|| HomeAssistantBindingConstants.BINDING_ID.equals(thingTypeUID.getBindingId()) && thingTypeUID.getId()
|
||||
.startsWith(HomeAssistantBindingConstants.HOMEASSISTANT_DEVICE_THING.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.listener;
|
||||
package org.openhab.binding.homeassistant.internal.listener;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.mqtt.generic.ChannelStateUpdateListener;
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.listener;
|
||||
package org.openhab.binding.homeassistant.internal.listener;
|
||||
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.binding.mqtt.homeassistant.internal.listener;
|
||||
package org.openhab.binding.homeassistant.internal.listener;
|
||||
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user