2 * Copyright (c) 2010-2020 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.mqtt.homeassistant.internal;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.mqtt.generic.values.ImageValue;
19 * A MQTT camera, following the https://www.home-assistant.io/components/camera.mqtt/ specification.
21 * At the moment this only notifies the user that this feature is not yet supported.
23 * @author David Graeff - Initial contribution
26 public class ComponentCamera extends AbstractComponent<ComponentCamera.ChannelConfiguration> {
27 public static final String cameraChannelID = "camera"; // Randomly chosen channel "ID"
30 * Configuration class for MQTT component
32 static class ChannelConfiguration extends BaseChannelConfiguration {
33 ChannelConfiguration() {
37 protected String topic = "";
40 public ComponentCamera(CFactory.ComponentConfiguration componentConfiguration) {
41 super(componentConfiguration, ChannelConfiguration.class);
43 ImageValue value = new ImageValue();
45 buildChannel(cameraChannelID, value, channelConfiguration.name, componentConfiguration.getUpdateListener())//
46 .stateTopic(channelConfiguration.topic)//