From e791f6e13d44d447daf24a4a093664332a226795 Mon Sep 17 00:00:00 2001 From: tylerpieper <54639597+tylerpieper@users.noreply.github.com> Date: Tue, 3 Jan 2023 16:16:35 -0700 Subject: [PATCH] Add an example automation to automatically update location The examples provided have a good start, but I suggest adding an example automation to automatically update the vehicle's location so users have everything needed to have location updates automatically. I have done this by triggering the automation when the odometer changes, that way we aren't wasting onstar calls when the vehicle is sitting still. --- HA-MQTT.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/HA-MQTT.md b/HA-MQTT.md index 1bc4d01..e6a3b0b 100644 --- a/HA-MQTT.md +++ b/HA-MQTT.md @@ -60,6 +60,20 @@ sequence: mode: single icon: 'mdi:map-marker' ``` +### Automation: +Create an automation to update the location whenever the odometer changes, instead of on a time interval. +```alias: Update EV Location +description: "" +trigger: + - platform: state + entity_id: + - sensor.odometer_mi +condition: [] +action: + - service: script.locate_bolt_ev + data: {} +mode: single +``` #### Commands: [OnStarJS Command Docs](https://github.com/samrum/OnStarJS#commands)