]> git.basschouten.com Git - openhab-addons.git/blob
e48f4f3292582c4f145faf02d75bcfdd9d989ef8
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.netatmo.internal.api.data;
14
15 import java.util.List;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18
19 /**
20  * This enum describes sub events in relation to a given event
21  *
22  * @author GaĆ«l L'hopital - Initial contribution
23  */
24 @NonNullByDefault
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),
35
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);
43
44     public final List<EventType> types;
45     public final int subType;
46
47     EventSubType(List<EventType> types, int i) {
48         this.types = types;
49         this.subType = i;
50     }
51 }