The Hatchery Lovelace Dashboard

I posted my HA dashboards on Facebook a couple weeks ago, and got some really positive feedback. I figured why not share it here too. Also, I was able to upload my configuration files for the different pages on the dashboard for anyone interested. You can find it all here: GitHub - ChizzyHat/Home-Assistant

I would be more than happy to answer any questions or provide any help if I can. Love HA, and have a real blast putting this together. Though I have found it is really a never ending journey as you always want to add more :slight_smile:









5 Likes

Hi, at first, I love your dashboards!

I’m trying to implement the Waze dashboard, but I’m struggling a bit with the sensors.
How do you configure the average travel time sensors?

WAZE Dashboard	

Firstly, I have different Waze integrations to use as the different data points. (I am changing some of the location names) Specifically:

School 1 is denoted as H
School 2 is denoted as P

WAZE Integrations"
Gym
H
H Return
H to P
P
P Return
P to H
Lake

Then I have a the following SQL Integration querries:
This is getting the data from the database that will be used to capture the 7-day moving average
__________
h1
SELECT state FROM states WHERE entity_id = 'sensor.H' AND last_updated <= datetime('now','-1 day','5 minute') AND last_updated >= datetime('now','-1 day','-5 minute')

Column* = state
Unit of Measure = min
__________
h2
SELECT state FROM states WHERE entity_id = 'sensor.H' AND last_updated <= datetime('now','-2 day','5 minute') AND last_updated >= datetime('now','-2 day','-5 minute')

Column* = state
Unit of Measure = min
__________
 ---and so on for the following......
h3
h4
h5
h6
h7
hr1
hr2
hr3
hr4
hr5
hr6
hr7
p1
p2
p3
p4
p5
p6
p7
pr1
pr2
pr3
pr4
pr5
pr6
pr7
___________________

For the Apex chart data I am using the following:
Chart 1:
sensor.average_travel_time_H
sensor.H

Chart 2:
sensor.P
sensor.average_travel_time_P

Chart 3:
sensor.round_trip
sensor.round_trip_h2p

__________________
I am using templates to create the variables I am using in the charts above:

templates.yaml

- sensor:
  - name: "Average Travel Time P"
    unit_of_measurement: "min"
    state: >
      {% set today_0 = states('sensor.P') | float %}
      {% set today_1 = states('sensor.p1') | float %}
      {% set today_2 = states('sensor.p2') | float %}
      {% set today_3 = states('sensor.p3') | float %}
      {% set today_4 = states('sensor.p4') | float %}
      {% set today_5 = states('sensor.p5') | float %}
      {% set today_6 = states('sensor.p6') | float %}
      {% set today_7 = states('sensor.p7') | float %}
      {{ ((today_0 + today_1 + today_2 + today_3 + today_4 + today_5 + today_6 + today_7) / 8) | round(1, default=0) }}


- sensor:
  - name: "Round Trip"
    unit_of_measurement: "min"
    state: >
      {% set today_ph1 = states('sensor.p') | float %}
      {% set today_ph2 = states('sensor.p_to_h') | float %}
      {% set today_ph3 = states('sensor.h_return') | float %}
      {{ ((today_ph1 + today_ph2 + today_ph3)) | round(1, default=0) }}
      
- sensor:
  - name: "Average Travel Time H"
    unit_of_measurement: "min"
    state: >
      {% set today_H0 = states('sensor.h') | float %}
      {% set today_H1 = states('sensor.h1') | float %}
      {% set today_H2 = states('sensor.h2') | float %}
      {% set today_H3 = states('sensor.h3') | float %}
      {% set today_H4 = states('sensor.h4') | float %}
      {% set today_H5 = states('sensor.h5') | float %}
      {% set today_H6 = states('sensor.h6') | float %}
      {% set today_H7 = states('sensor.h7') | float %}
      {{ ((today_H0 + today_H1 + today_H2 + today_H3 + today_H4 + today_H5 + today_H6 + today_H7) / 8) | round(1, default=0) }}
      
- sensor:
  - name: "Round Trip H2P"
    unit_of_measurement: "min"
    state: >
      {% set today_hp1 = states('sensor.h') | float %}
      {% set today_hp2 = states('sensor.h_to_p') | float %}
      {% set today_hp3 = states('sensor.p_return') | float %}
      {{ ((today_hp1 + today_hp2 + today_hp3)) | round(1, default=0) }}
      
- sensor:
  - name: "H Round Trip"
    unit_of_measurement: "min"
    state: >
      {% set today_h1 = states('sensor.h') | float %}
      {% set today_h2 = states('sensor.h_return') | float %}
      {{ ((today_h1 + today_h2)) | round(1, default=0) }}
      
- sensor:
  - name: "P Round Trip"
    unit_of_measurement: "min"
    state: >
      {% set today_p1 = states('sensor.p') | float %}
      {% set today_p2 = states('sensor.p_return') | float %}
      {{ ((today_p1 + today_p2)) | round(1, default=0) }}
1 Like