2 * Copyright (c) 2010-2021 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.tesla.internal.discovery;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.binding.tesla.internal.TeslaHandlerFactory;
20 import org.openhab.binding.tesla.internal.command.TeslaCommandExtension;
21 import org.openhab.core.config.discovery.AbstractDiscoveryService;
22 import org.openhab.core.config.discovery.DiscoveryResult;
23 import org.openhab.core.config.discovery.DiscoveryService;
24 import org.osgi.service.component.annotations.Component;
27 * This is a discovery service, is used by the {@link TeslaCommandExtension} for
28 * automatically creating Tesla accounts.
30 * @author Kai Kreuzer - Initial contribution
33 @Component(service = { TeslaAccountDiscoveryService.class, DiscoveryService.class })
35 public class TeslaAccountDiscoveryService extends AbstractDiscoveryService {
37 public TeslaAccountDiscoveryService() throws IllegalArgumentException {
38 super(TeslaHandlerFactory.SUPPORTED_THING_TYPES_UIDS, 10, true);
42 protected void startScan() {
46 public void activate(@Nullable Map<String, Object> configProperties) {
47 super.activate(configProperties);
51 public void deactivate() {
56 public void thingDiscovered(DiscoveryResult discoveryResult) {
57 super.thingDiscovered(discoveryResult);