@@ -241,6 +241,9 @@ public static BaseCluster getCluster(long clusterId) {
241
241
if (clusterId == EnergyEvse.ID) {
242
242
return new EnergyEvse();
243
243
}
244
+ if (clusterId == EnergyCalendar.ID) {
245
+ return new EnergyCalendar();
246
+ }
244
247
if (clusterId == EnergyPreference.ID) {
245
248
return new EnergyPreference();
246
249
}
@@ -10012,6 +10015,118 @@ public long getCommandID(String name) throws IllegalArgumentException {
10012
10015
return Command.valueOf(name).getID();
10013
10016
}
10014
10017
}
10018
+ public static class EnergyCalendar implements BaseCluster {
10019
+ public static final long ID = 154L;
10020
+ public long getID() {
10021
+ return ID;
10022
+ }
10023
+
10024
+ public enum Attribute {
10025
+ CalendarID(0L),
10026
+ Name(1L),
10027
+ ProviderID(2L),
10028
+ EventID(3L),
10029
+ StartDate(4L),
10030
+ CalendarPeriods(5L),
10031
+ SpecialDays(6L),
10032
+ CurrentDay(7L),
10033
+ NextDay(8L),
10034
+ CurrentTransition(9L),
10035
+ CurrentPeakPeriod(10L),
10036
+ NextPeakPeriod(11L),
10037
+ GeneratedCommandList(65528L),
10038
+ AcceptedCommandList(65529L),
10039
+ EventList(65530L),
10040
+ AttributeList(65531L),
10041
+ FeatureMap(65532L),
10042
+ ClusterRevision(65533L),;
10043
+ private final long id;
10044
+ Attribute(long id) {
10045
+ this.id = id;
10046
+ }
10047
+
10048
+ public long getID() {
10049
+ return id;
10050
+ }
10051
+
10052
+ public static Attribute value(long id) throws NoSuchFieldError {
10053
+ for (Attribute attribute : Attribute.values()) {
10054
+ if (attribute.getID() == id) {
10055
+ return attribute;
10056
+ }
10057
+ }
10058
+ throw new NoSuchFieldError();
10059
+ }
10060
+ }
10061
+
10062
+ public enum Event {;
10063
+ private final long id;
10064
+ Event(long id) {
10065
+ this.id = id;
10066
+ }
10067
+
10068
+ public long getID() {
10069
+ return id;
10070
+ }
10071
+
10072
+ public static Event value(long id) throws NoSuchFieldError {
10073
+ for (Event event : Event.values()) {
10074
+ if (event.getID() == id) {
10075
+ return event;
10076
+ }
10077
+ }
10078
+ throw new NoSuchFieldError();
10079
+ }
10080
+ }
10081
+
10082
+ public enum Command {;
10083
+ private final long id;
10084
+ Command(long id) {
10085
+ this.id = id;
10086
+ }
10087
+
10088
+ public long getID() {
10089
+ return id;
10090
+ }
10091
+
10092
+ public static Command value(long id) throws NoSuchFieldError {
10093
+ for (Command command : Command.values()) {
10094
+ if (command.getID() == id) {
10095
+ return command;
10096
+ }
10097
+ }
10098
+ throw new NoSuchFieldError();
10099
+ }
10100
+ }@Override
10101
+ public String getAttributeName(long id) throws NoSuchFieldError {
10102
+ return Attribute.value(id).toString();
10103
+ }
10104
+
10105
+ @Override
10106
+ public String getEventName(long id) throws NoSuchFieldError {
10107
+ return Event.value(id).toString();
10108
+ }
10109
+
10110
+ @Override
10111
+ public String getCommandName(long id) throws NoSuchFieldError {
10112
+ return Command.value(id).toString();
10113
+ }
10114
+
10115
+ @Override
10116
+ public long getAttributeID(String name) throws IllegalArgumentException {
10117
+ return Attribute.valueOf(name).getID();
10118
+ }
10119
+
10120
+ @Override
10121
+ public long getEventID(String name) throws IllegalArgumentException {
10122
+ return Event.valueOf(name).getID();
10123
+ }
10124
+
10125
+ @Override
10126
+ public long getCommandID(String name) throws IllegalArgumentException {
10127
+ return Command.valueOf(name).getID();
10128
+ }
10129
+ }
10015
10130
public static class EnergyPreference implements BaseCluster {
10016
10131
public static final long ID = 155L;
10017
10132
public long getID() {
0 commit comments