Entity.fromJson constructor

Entity.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Entity.fromJson(Map<String, dynamic> json) {
  return Entity(
    entityId: json['entity_id'],
    state: json['state'],
    attributes: EntityAttributes.fromJson(json['attributes']),
    lastChanged: json['last_changed'],
    lastUpdated: json['last_updated'],
    context: EntityContext.fromJson(json['context']),
  );
}