2 * Copyright (c) 2010-2022 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.netatmo.internal.api.data;
15 import java.util.List;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
20 * This enum describes sub events in relation to a given event
22 * @author Gaƫl L'hopital - Initial contribution
25 public enum EventSubType {
26 SD_CARD_MISSING(List.of(EventType.SD), 1),
27 SD_CARD_INSERTED(List.of(EventType.SD), 2),
28 SD_CARD_FORMATTED(List.of(EventType.SD), 3),
29 SD_CARD_WORKING(List.of(EventType.SD), 4),
30 SD_CARD_DEFECTIVE(List.of(EventType.SD), 5),
31 SD_CARD_INCOMPATIBLE_SPEED(List.of(EventType.SD), 6),
32 SD_CARD_INSUFFICIENT_SPACE(List.of(EventType.SD), 7),
33 ALIM_INCORRECT_POWER(List.of(EventType.ALIM), 1),
34 ALIM_CORRECT_POWER(List.of(EventType.ALIM), 2),
36 // Artificially implemented by the binding subtypes
37 PERSON_ARRIVAL(List.of(EventType.PERSON, EventType.PERSON_HOME), 1),
38 PERSON_SEEN(List.of(EventType.PERSON), 2),
39 PERSON_DEPARTURE(List.of(EventType.PERSON_AWAY), 1),
40 MOVEMENT_HUMAN(List.of(EventType.MOVEMENT, EventType.HUMAN), 1),
41 MOVEMENT_VEHICLE(List.of(EventType.MOVEMENT), 2),
42 MOVEMENT_ANIMAL(List.of(EventType.MOVEMENT, EventType.ANIMAL), 3);
44 public final List<EventType> types;
45 public final int subType;
47 EventSubType(List<EventType> types, int i) {