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.tesla.internal.discovery;
17 import org.eclipse.jdt.annotation.NonNull;
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 })
34 public class TeslaAccountDiscoveryService extends AbstractDiscoveryService {
36 public TeslaAccountDiscoveryService() throws IllegalArgumentException {
37 super(TeslaHandlerFactory.SUPPORTED_THING_TYPES_UIDS, 10, true);
41 protected void startScan() {
45 public void activate(@Nullable Map<@NonNull String, @Nullable Object> configProperties) {
46 super.activate(configProperties);
50 public void deactivate() {
55 public void thingDiscovered(DiscoveryResult discoveryResult) {
56 super.thingDiscovered(discoveryResult);