Light.fromJson constructor
Implementation
factory Light.fromJson(Map<String, dynamic> json) {
return Light(
state: LightState.fromJson(json['state']),
buttons: List<Button>.from((json['buttons'] as Iterable).map((e) => Button.fromJson(e))),
);
}