Very rough autodiscovery message to be used with weconnect-mqtt and Home Assistant.
One needs to replace the follwing placeholders:
- {VIN} with the vehicel's VIN
- {NAME} with a name (e.g. "ID.7")
- {BRAND} with the car's brand (e.g. "Volkswagen")
- {PREFIX} with a prefix for ids if one wants that.
Can be used like so:
curl -sS https://gist.githubusercontent.com/mschae/d7d30d5302a0a69e75e13060ebb8081f/raw/47a90b5e990fa0ec42f467d2ae6f0e75ee45b21b/auto
discovery.json | \
sed 's/{VIN}/SOMEVIN/g' | \
sed 's/{PREFIX}/id0_/g' | \
sed 's/{NAME}/ID.0/g' | \
sed 's/{BRAND}/Volkswagen/g' | \
mosquitto_pub -h <host> -t homeassistant/device/<someid>/config -r -s