toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'entity_id': entityId,
    'state': state,
    'attributes': attributes.toJson(),
    'last_changed': lastChanged,
    'last_updated': lastUpdated,
    'context': context.toJson(),
  };
}