This commit is contained in:
omenem 2020-05-15 19:01:28 +02:00
parent 3d9ddb5ffd
commit 7020f0d692

View file

@ -2,6 +2,7 @@ package ch.usi.inf.sa4.sanmarinoes.smarthut.models;
import ch.usi.inf.sa4.sanmarinoes.smarthut.config.GsonExclude;
import ch.usi.inf.sa4.sanmarinoes.smarthut.config.SocketGsonExclude;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
import javax.validation.constraints.Max;
@ -19,7 +20,7 @@ public class Dimmable extends Switchable implements RangeTriggerable {
@ManyToMany(mappedBy = "dimmables", cascade = CascadeType.DETACH)
@GsonExclude
@SocketGsonExclude
private Set<Dimmer> dimmers;
private Set<Dimmer> dimmers = new HashSet<>();
/** The light intensity value. Goes from 0 (off) to 100 (on) */
@NotNull