diff --git a/sensors/devices.yaml b/sensors/devices.yaml index 8a40fdd..a183edf 100644 --- a/sensors/devices.yaml +++ b/sensors/devices.yaml @@ -3,10 +3,10 @@ amazon_dot_lr: friendly_name: 'Amazon Dot LR' value_template: "{{ 'Online' if is_state('device_tracker.kindlecdf98981f', 'home') else 'Offline' }}" - + circle: friendly_name: 'Disney Circle' - value_template: "{{ 'Online' if is_state('device_tracker.circle', 'home') else 'Offline' }}" + value_template: "{{ 'Online' if is_state('device_tracker.circle', 'home') else 'Offline' }}" tycho: friendly_name: 'tycho' @@ -47,3 +47,21 @@ kat_mini: friendly_name: "Kat's Mini" value_template: "{{ 'Online' if is_state('device_tracker.katherinesmini', 'home') else 'Offline' }}" + + jeff_iphone_batt: + unit_of_measurement: '%' + value_template: >- + {%- if states.device_tracker.jeffreysiphone.attributes.battery %} + {{ states.device_tracker.jeffreysiphone.attributes.battery | round(1) }} + {% else %} + {{ states.sensor.jeff_iphone_batt.state }} + {%- endif %} + + kat_iphone_batt: + unit_of_measurement: '%' + value_template: >- + {%- if states.device_tracker.katherinestonesiphone.attributes.battery %} + {{ states.device_tracker.katherinestonesiphone.attributes.battery | round(1) }} + {% else %} + {{ states.sensor.kat_iphone_batt.state }} + {%- endif %} \ No newline at end of file diff --git a/sensors/google_travel_time.yaml b/sensors/google_travel_time.yaml new file mode 100644 index 0000000..8064c7d --- /dev/null +++ b/sensors/google_travel_time.yaml @@ -0,0 +1,5 @@ +- platform: google_travel_time + name: "Jeff ETT Home" + api_key: !secret google_api + origin: device_tracker.owntracks_jeffreysphone + destination: zone.home \ No newline at end of file diff --git a/sensors/owntracks.yaml b/sensors/owntracks.yaml index 0bb2975..67fd754 100644 --- a/sensors/owntracks.yaml +++ b/sensors/owntracks.yaml @@ -8,7 +8,6 @@ name: "Jeff Velocity" state_topic: "owntracks/owntracks/jeffreysphone" qos: 0 - unit_of_measurement: "" - value_template: '{{ value_json.vel }}' + unit_of_measurement: "mph" + value_template: '{{ value_json.vel }} ' - \ No newline at end of file