factory Sensor.fromJson(Map json, {int? id}) { return serializers .deserializeWith(Sensor.serializer, json)! .rebuild((b) => b..id = id); }