Skip to content

Commit

Permalink
Added next appointment leave notification for user two
Browse files Browse the repository at this point in the history
  • Loading branch information
eifinger committed Aug 21, 2018
1 parent d9b99df commit 34459a7
Show file tree
Hide file tree
Showing 11 changed files with 250 additions and 21 deletions.
23 changes: 14 additions & 9 deletions alexa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
- switch.large_ventilator
- group.tom
- switch.markise
- switch.rosie_clean
- switch.rosie_home
- switch.goldie_clean
- switch.goldie_home
- switch.tv
- switch.bedroom_receiver
- group.eingang
Expand All @@ -27,6 +27,7 @@
- script.receiver_set_source_cbl_sat
- script.receiver_set_source_media_player
- script.receiver_set_source_dvd
- script.receiver_set_source_gaming
- group.stair_lights
- input_boolean.turn_fan_on_when_hot
- input_boolean.sleepmode
Expand Down Expand Up @@ -70,13 +71,13 @@
name: Markise
description: Markise
display_categories: SWITCH
switch.rosie_clean:
name: Rosie
description: Simuliere Rosies "Clean" Kommando
display_categories: SWITCH
switch.rosie_home:
name: Rosie Nach Hause
description: Schicke Rosie nach Hause
script.goldie_clean:
name: Goldie
description: Simuliere Goldies "Clean" Kommando
display_categories: SCENE_TRIGGER
switch.goldie_home:
name: Goldie Nach Hause
description: Schicke Goldie nach Hause
display_categories: SWITCH
switch.tv:
name: Fernseher
Expand Down Expand Up @@ -136,6 +137,10 @@
name: Receiver Kodi
description: Schalte Receiver auf DvD / Kodi
display_categories: SCENE_TRIGGER
script.receiver_set_source_gaming:
name: Receiver Gaming
description: Schalte Receiver auf Gaming
display_categories: SCENE_TRIGGER
light.bar_table:
name: Bar
description: Bartisch
Expand Down
8 changes: 8 additions & 0 deletions camera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
name: next_appointment_location_street_view
still_image_url: !secret next_appointment_location_street_view_url #https://maps.googleapis.com/maps/api/streetview?size=600x300&location={{sensor.cal_next_appointment_location_google_prepared}}&key=APIKEY
limit_refetch_to_url_change: true
- platform: generic
name: next_appointment_location_staticmap_user_two
still_image_url: !secret next_appointment_location_static_map_url_user_two #https://maps.googleapis.com/maps/api/staticmap?center={{states("sensor.cal_next_appointment_location_google_prepared")}}&zoom=17&size=600x300&maptype=roadmap&markers=color:blue
limit_refetch_to_url_change: true
- platform: generic
name: next_appointment_location_street_view_user_two
still_image_url: !secret next_appointment_location_street_view_url_user_two #https://maps.googleapis.com/maps/api/streetview?size=600x300&location={{sensor.cal_next_appointment_location_google_prepared}}&key=APIKEY
limit_refetch_to_url_change: true
- platform: local_file
name: Saved Image
file_path: !secret saved_image_filepath
Expand Down
90 changes: 85 additions & 5 deletions customize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,62 @@ sensor.travel_time_next_appointment_location_transit:
} else {
return "green";
}
sensor.travel_time_next_appointment_location_car_user_two:
icon: mdi:car
friendly_name: "Sina -> Nächster Termin"
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
templates:
icon_color: >
if (attributes.duration_in_traffic > attributes.duration * 1.2 ) {
return "red";
} else if (attributes.duration_in_traffic > attributes.duration ) {
return "orange";
} else {
return "green";
}
sensor.travel_time_next_appointment_location_bike_user_two:
icon: mdi:bike
friendly_name: "Sina -> Nächster Termin"
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
templates:
icon_color: >
if (attributes.duration_in_traffic > attributes.duration * 1.2 ) {
return "red";
} else if (attributes.duration_in_traffic > attributes.duration ) {
return "orange";
} else {
return "green";
}
sensor.travel_time_next_appointment_location_walking_user_two:
icon: mdi:walk
friendly_name: "Sina -> Nächster Termin"
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
templates:
icon_color: >
if (attributes.duration_in_traffic > attributes.duration * 1.2 ) {
return "red";
} else if (attributes.duration_in_traffic > attributes.duration ) {
return "orange";
} else {
return "green";
}
sensor.travel_time_next_appointment_location_transit_user_two:
icon: mdi:bus
friendly_name: "Sina -> Nächster Termin"
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
templates:
icon_color: >
if (attributes.duration_in_traffic > attributes.duration * 1.2 ) {
return "red";
} else if (attributes.duration_in_traffic > attributes.duration ) {
return "orange";
} else {
return "green";
}
input_boolean.travel_time_work_from_home:
friendly_name: "Zu Hause -> SVA Benachrichtigung"
custom_ui_state_card: state-card-custom-ui
Expand Down Expand Up @@ -136,7 +192,29 @@ input_select.next_appointment_travel_mode:
} else if ( state === 'Laufen' ) {
return "mdi:walk"
}
sensor.cal_next_appointment_title:
sensor.cal_next_appointment_title_user_two:
icon: mdi:calendar
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
input_boolean.announce_time_to_leave_user_two:
friendly_name: "Sina -> Nächster Termin Benachrichtigung"
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
input_select.next_appointment_travel_mode_user_two:
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
templates:
icon: >
if ( state === 'Auto' ) {
return "mdi:car";
} else if ( state === 'Fahrrad' ) {
return "mdi:bike"
} else if ( state === 'Öffis' ) {
return "mdi:bus"
} else if ( state === 'Laufen' ) {
return "mdi:walk"
}
sensor.cal_next_appointment_title_user_two:
icon: mdi:calendar
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
Expand Down Expand Up @@ -234,23 +312,25 @@ binary_sensor.switch_158d0002008d07:
friendly_name: "Button Arbeitszimmer"
binary_sensor.switch_158d00021329bc:
friendly_name: "Button Flur"
binary_sensor.switch_158d0001b12a12:
friendly_name: "Button Schlafzimmer"
#################################################################
## Xiaomi Temp/Hum Sensor
#################################################################
sensor.humidity_158d0002320b3f:
friendly_name: "Luftfeuchtigkeit 1"
friendly_name: "Arbeitszimmer Humidity"
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
sensor.humidity_158d000245a938:
friendly_name: "Luftfeuchtigkeit 2"
friendly_name: "Schlafzimmer Humidity"
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
sensor.temperature_158d0002320b3f:
friendly_name: "Temperatur 2"
friendly_name: "Arbeitszimmer Temperature"
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
sensor.temperature_158d000245a938:
friendly_name: "Temperatur 1"
friendly_name: "Schlafzimmer Temperature"
custom_ui_state_card: state-card-custom-ui
show_last_changed: true
#################################################################
Expand Down
36 changes: 34 additions & 2 deletions group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ view_traveltimes:
- group.traveltimes

view_next_appointment:
name: Nächster Termin
name: Nächster Termin Kevin
view: yes
icon: mdi:calendar
entities:
Expand All @@ -57,6 +57,16 @@ view_next_appointment:
- camera.next_appointment_location_staticmap
- camera.next_appointment_location_street_view

view_next_appointment_user_two:
name: Nächster Termin Sina
view: yes
icon: mdi:calendar
entities:
- group.next_appointment_user_two
- group.next_appointment_traveltimes_user_two
- camera.next_appointment_location_staticmap_user_two
- camera.next_appointment_location_street_view_user_two

view_cameras:
name: Kameras
view: yes
Expand Down Expand Up @@ -302,6 +312,15 @@ next_appointment_traveltimes:
- sensor.travel_time_next_appointment_location_walking
- input_boolean.announce_time_to_leave

next_appointment_traveltimes_user_two:
name: Reisezeiten
entities:
- sensor.travel_time_next_appointment_location_car_user_two
- sensor.travel_time_next_appointment_location_bike_user_two
- sensor.travel_time_next_appointment_location_transit_user_two
- sensor.travel_time_next_appointment_location_walking_user_two
- input_boolean.announce_time_to_leave_user_two

motion:
name: Bewegungsmelder
entities:
Expand Down Expand Up @@ -353,7 +372,7 @@ media_players:
- media_player.kodi

next_appointment:
name: Nächster Termin
name: Nächster Termin Kevin
entities:
- sensor.cal_next_appointment_title
- sensor.cal_next_appointment_location
Expand All @@ -363,6 +382,17 @@ next_appointment:
- input_number.leave_time_offset
- input_select.next_appointment_travel_mode

next_appointment_user_two:
name: Nächster Termin Sina
entities:
- sensor.cal_next_appointment_title_user_two
- sensor.cal_next_appointment_location_user_two
- sensor.cal_next_appointment_start_time_user_two
- sensor.travel_time_next_appointment_location_user_two
- sensor.calc_leave_time_user_two
- input_number.leave_time_offset_user_two
- input_select.next_appointment_travel_mode_user_two

stair_lights:
name: Treppenlichter
entities:
Expand Down Expand Up @@ -473,10 +503,12 @@ alarm:
- input_boolean.radiowakeup
- binary_sensor.workday_today
- binary_sensor.workday_tomorrow

standards:
name: Standard Einstellungen
entities:
- input_select.next_appointment_travel_mode_standard
- input_select.next_appointment_travel_mode_standard_user_two

ventilator:
name: Ventilator Automation
Expand Down
4 changes: 4 additions & 0 deletions input_boolean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
icon: mdi:telegram
announce_time_to_leave:
icon: mdi:telegram
announce_time_to_leave_user_two:
icon: mdi:telegram
room_based_light:
icon: mdi:lightbulb
heading_home_notifier_user_one:
Expand Down Expand Up @@ -76,6 +78,8 @@
icon: mdi:auto-fix
detect_door_open_when_going_to_bed:
icon: mdi:auto-fix
detect_windows_open_when_going_to_bed:
icon: mdi:auto-fix
roggen_notifier:
icon: mdi:auto-fix
graeser_notifier:
Expand Down
5 changes: 5 additions & 0 deletions input_number.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ leave_time_offset:
min: 0
max: 60
step: 5
leave_time_offset_user_two:
name: Extra Zeit
min: 0
max: 60
step: 5
alarmhour:
name: Stunde
icon: mdi:timer
Expand Down
16 changes: 16 additions & 0 deletions input_select.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ next_appointment_travel_mode:
- Laufen

next_appointment_travel_mode_standard:
name: Standard Reiseart
options:
- Auto
- Fahrrad
- Öffis
- Laufen

next_appointment_travel_mode_user_two:
name: Reiseart
options:
- Auto
- Fahrrad
- Öffis
- Laufen

next_appointment_travel_mode_standard_user_two:
name: Standard Reiseart
options:
- Auto
Expand Down
19 changes: 18 additions & 1 deletion scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ receiver_set_source_dvd:
entity_id: media_player.denon_avrx1300w
data:
source: 'DVD/Blu-ray'

receiver_set_source_gaming:
sequence:
- service: media_player.select_source
entity_id: media_player.denon_avrx1300w
data:
source: 'Game'
#################################################################
## Kodi
#################################################################
Expand Down Expand Up @@ -67,4 +74,14 @@ bar_table_white:
#################################################################
learn_faces:
sequence:
- event: eifinger_learn_faces
- event: eifinger_learn_faces
#################################################################
## Goldie
#################################################################
goldie_clean:
sequence:
- service: switch.turn_on
entity_id: switch.goldie_clean
- delay: '00:00:05'
- service: switch.turn_on
entity_id: switch.goldie_clean
Loading

0 comments on commit 34459a7

Please sign in to comment.