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