-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for publishing ChannelDescriptionChangedEvents (#10900)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
- Loading branch information
Showing
8 changed files
with
106 additions
and
130 deletions.
There are no files selected for viewing
77 changes: 0 additions & 77 deletions
77
....deconz/src/main/java/org/openhab/binding/deconz/internal/CommandDescriptionProvider.java
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
...ain/java/org/openhab/binding/deconz/internal/DeconzDynamicCommandDescriptionProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* Copyright (c) 2010-2021 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.deconz.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.openhab.core.thing.ThingUID; | ||
import org.openhab.core.thing.binding.BaseDynamicCommandDescriptionProvider; | ||
import org.openhab.core.thing.type.DynamicCommandDescriptionProvider; | ||
import org.osgi.service.component.annotations.Component; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
/** | ||
* Dynamic channel command description provider. | ||
* Overrides the command description for the controls, which receive its configuration in the runtime. | ||
* | ||
* @author Jan N. Klug - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
@Component(service = { DynamicCommandDescriptionProvider.class, DeconzDynamicCommandDescriptionProvider.class }) | ||
public class DeconzDynamicCommandDescriptionProvider extends BaseDynamicCommandDescriptionProvider { | ||
private final Logger logger = LoggerFactory.getLogger(DeconzDynamicCommandDescriptionProvider.class); | ||
|
||
/** | ||
* remove all descriptions for a given thing | ||
* | ||
* @param thingUID the thing's UID | ||
*/ | ||
public void removeDescriptionsForThing(ThingUID thingUID) { | ||
logger.trace("removing state description for thing {}", thingUID); | ||
channelOptionsMap.entrySet().removeIf(entry -> entry.getKey().getThingUID().equals(thingUID)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.