HaDiscovery

Generates Home Assistant MQTT auto-discovery payloads for WeConnect vehicles.

Call forVehicle to get the full set of discovery payloads (sensors, binary sensors, switches, buttons). Use stateTopics to map VehicleStatus fields to their corresponding MQTT state topics.

This object does not include an MQTT client -- consumers are responsible for publishing the payloads and state values over their own MQTT connection.

Functions

Link copied to clipboard

Builds discovery payloads for all supported HA entities (18 sensors, 3 binary sensors, 4 switches, 2 buttons) grouped under a single device identified by the vehicle's VIN.

Link copied to clipboard

Returns a map from MQTT state topic to a function that extracts the value from a VehicleStatus.