Models for MQTT Events.
BaseEvent
dataclass
Bases: DataClassORJSONMixin
Base model for all Events.
Raw events from the MQTT broker don't include vin or event_type.
from_mqtt_message(topic, payload)
classmethod
Return a parsed event object.
'topic' is the original MQTT topic on which the event was received 'payload' is the original payload as a binary string
EventType
Bases: StrEnum
The different 'types' of events.
The type is determine by a part of the MQTT topic.
OperationEvent
dataclass
ServiceEvent
dataclass
Bases: BaseEvent
Base model for all Service Events.
Service Events are unsolicited events emitted by the MQTT bus towards the client. Service Events have a 'name' field which can be used as a discriminator.
ServiceEventAccess
dataclass
ServiceEventAirConditioning
dataclass
ServiceEventChangeSocData
dataclass
Bases: ServiceEventData
Charging data inside charging service event change-soc.
TODO: Remove the None defaults where they aren't really needed...
ServiceEventCharging
dataclass
ServiceEventData
dataclass
ServiceEventDeparture
dataclass
ServiceEventErrorData
dataclass
ServiceEventName
Bases: StrEnum
List of known Service Event Names.
ServiceEventOdometer
dataclass
VehicleEventData
dataclass
VehicleEventName
Bases: StrEnum
List of known vehicle EventNames.