diff --git a/alerts/jeff_bad_traffic_home.yaml b/alerts/jeff_bad_traffic_home.yaml new file mode 100644 index 0000000..5eb471d --- /dev/null +++ b/alerts/jeff_bad_traffic_home.yaml @@ -0,0 +1,10 @@ +jeff_bad_traffic_home: + name: Traffic Bad! Currently {{states.sensor.jeff_ett_home.attributes.duration_in_traffic}} mins home! + done_message: Canceling Traffic Alert + entity_id: jeff_traffic_alert_home + state: 'on' + repeat: 10 + can_acknowledge: True + skip_first: False + notifiers: + - jeff_ios \ No newline at end of file diff --git a/automation/presence.yaml b/automation/presence.yaml index 3429f6c..9706033 100644 --- a/automation/presence.yaml +++ b/automation/presence.yaml @@ -72,6 +72,8 @@ action: - service: script.jeff_destination_na - service: script.jeff_at_work_notification + - service: input_boolean.turn_off + entity_id: input_boolean.jeff_traffic_alert_home - alias: Kat Arrives Home Notification trigger: diff --git a/automation/transit.yaml b/automation/transit.yaml index 793f7e5..d2b4641 100644 --- a/automation/transit.yaml +++ b/automation/transit.yaml @@ -17,3 +17,35 @@ - service: input_boolean.turn_on entity_id: input_boolean.jeff_heading_home + + +##### Jeff Traffic Alerts +- alias: Enable Jeff Bad Traffic Home + trigger: + - platform: mumeric-state + entity_id: sensor.jeff_ett_home + above: 59 + condition: + - condition: state + entity_id: sensor.jeff_location + state: 'Summit' + condition: + - condition: state + entity_id: input_boolean.jeff_traffic_alerts + state: 'on' + action: + - service: input_boolean.turn_on + entity_id: input_boolean.jeff_traffic_alert_home + +- alias: Disabling Jeff Bad Traffic Home + trigger: + - platform: mumeric-state + entity_id: sensor.jeff_ett_home + below: 40 + condition: + - condition: state + entity_id: input_boolean.jeff_traffic_alert_home + state: 'on' + action: + - service: input_boolean.turn_off + entity_id: input_boolean.jeff_traffic_alert_home \ No newline at end of file diff --git a/input_boolean.yaml b/input_boolean.yaml index 5572032..6d7ca4a 100644 --- a/input_boolean.yaml +++ b/input_boolean.yaml @@ -74,4 +74,10 @@ washer_running: icon: mdi:speaker-wireless skylar_dressed_alarm: name: Skylar Dressed Alarm - icon: mdi:speaker-wireless \ No newline at end of file + icon: mdi:speaker-wireless +jeff_traffic_alerts: + name: Jeff Traffic Alerts + icon: mdi:bell-plus +jeff_traffic_alert_home: + name: Jeff Traffic Alert Home + icon: mdi:traffic-light \ No newline at end of file