2 * Copyright (c) 2010-2023 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.component;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.mqtt.generic.values.ImageValue;
17 import org.openhab.binding.mqtt.homeassistant.internal.config.dto.AbstractChannelConfiguration;
20 * A MQTT camera, following the https://www.home-assistant.io/components/camera.mqtt/ specification.
22 * At the moment this only notifies the user that this feature is not yet supported.
24 * @author David Graeff - Initial contribution
27 public class Camera extends AbstractComponent<Camera.ChannelConfiguration> {
28 public static final String CAMERA_CHANNEL_ID = "camera"; // Randomly chosen channel "ID"
31 * Configuration class for MQTT component
33 static class ChannelConfiguration extends AbstractChannelConfiguration {
34 ChannelConfiguration() {
38 protected String topic = "";
41 public Camera(ComponentFactory.ComponentConfiguration componentConfiguration) {
42 super(componentConfiguration, ChannelConfiguration.class);
44 ImageValue value = new ImageValue();
46 buildChannel(CAMERA_CHANNEL_ID, value, getName(), componentConfiguration.getUpdateListener())
47 .stateTopic(channelConfiguration.topic).build();