Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save pbuckley4192/9c95b602b9675b9c7b3f8ed98e281870 to your computer and use it in GitHub Desktop.

Select an option

Save pbuckley4192/9c95b602b9675b9c7b3f8ed98e281870 to your computer and use it in GitHub Desktop.

Revisions

  1. pbuckley4192 created this gist Apr 5, 2019.
    22 changes: 22 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    - id: '1552465990326'
    alias: Car Location
    trigger:
    - platform: mqtt
    topic: homeassistant/sensor/android_pauls_phone_hfp/state
    condition:
    - condition: template
    value_template: '{{ trigger.payload_json[''last_device_mac''] == ''10:08:C1:XX:XX:XX''
    }}'
    - condition: template
    value_template: '{{ trigger.payload_json.last_device_longitude is defined }}'
    action:
    - data_template:
    dev_id: my_car_id
    gps:
    - '{{ trigger.payload_json.last_device_latitude }}'
    - '{{ trigger.payload_json.last_device_longitude }}'
    gps_accuracy: 1
    host_name: 'Santa Fe'
    mac: '10:08:C1:XX:XX:XX'
    source_type: gps
    service: device_tracker.see