diff --git a/alexa.yaml b/alexa.yaml index 50711a34..db3a3ad6 100644 --- a/alexa.yaml +++ b/alexa.yaml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/camera.yaml b/camera.yaml index e4eaf76e..b06b2cd0 100644 --- a/camera.yaml +++ b/camera.yaml @@ -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 diff --git a/customize.yaml b/customize.yaml index 8c318c15..f7ed0eb5 100644 --- a/customize.yaml +++ b/customize.yaml @@ -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 @@ -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 @@ -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 ################################################################# diff --git a/group.yaml b/group.yaml index 7cba1ab6..2eaac668 100644 --- a/group.yaml +++ b/group.yaml @@ -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: @@ -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 @@ -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: @@ -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 @@ -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: @@ -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 diff --git a/input_boolean.yaml b/input_boolean.yaml index 13bddf0f..282e6c08 100644 --- a/input_boolean.yaml +++ b/input_boolean.yaml @@ -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: @@ -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: diff --git a/input_number.yaml b/input_number.yaml index 3eae5a9a..90fb6228 100644 --- a/input_number.yaml +++ b/input_number.yaml @@ -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 diff --git a/input_select.yaml b/input_select.yaml index af2452f2..4ce4f22a 100644 --- a/input_select.yaml +++ b/input_select.yaml @@ -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 diff --git a/scripts.yaml b/scripts.yaml index 6f205f7e..21da004f 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -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 ################################################################# @@ -67,4 +74,14 @@ bar_table_white: ################################################################# learn_faces: sequence: - - event: eifinger_learn_faces \ No newline at end of file + - 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 \ No newline at end of file diff --git a/sensor.yaml b/sensor.yaml index cc91496a..77522bf3 100644 --- a/sensor.yaml +++ b/sensor.yaml @@ -264,9 +264,44 @@ destination: sensor.cal_next_appointment_location_google_prepared options: mode: transit +#Next Appointment Car User Two +- platform: google_travel_time + name: travel_time_next_appointment_location_car_user_two + api_key: !secret google_maps_api_token_user_two + origin: !secret device_user_two + destination: sensor.cal_next_appointment_location_google_prepared_user_two + options: + arrival_time: sensor.cal_next_appointment_start_time_user_two +#Next Appointment Bike User Two +- platform: google_travel_time + name: travel_time_next_appointment_location_bike_user_two + api_key: !secret google_maps_api_token_user_two + origin: !secret device_user_two + destination: sensor.cal_next_appointment_location_google_prepared_user_two + options: + arrival_time: sensor.cal_next_appointment_start_time_user_two + mode: bicycling +#Next Appointment Walking User Two +- platform: google_travel_time + name: travel_time_next_appointment_location_walking_user_two + api_key: !secret google_maps_api_token_user_two + origin: !secret device_user_two + destination: sensor.cal_next_appointment_location_google_prepared_user_two + options: + arrival_time: sensor.cal_next_appointment_start_time_user_two + mode: walking +#Next Appointment Transit User Two +- platform: google_travel_time + name: travel_time_next_appointment_location_transit_user_two + api_key: !secret google_maps_api_token_user_two + origin: !secret device_user_two + destination: sensor.cal_next_appointment_location_google_prepared_user_two + options: + mode: transit ################################################################# ## Next Appointment ################################################################# +#User One - platform: template sensors: cal_next_appointment_title: @@ -288,6 +323,28 @@ friendly_name: Dauer unit_of_measurement: min value_template: '{% if is_state("input_select.next_appointment_travel_mode","Auto") %}{{states("sensor.travel_time_next_appointment_location_car")}} {% elif is_state("input_select.next_appointment_travel_mode","Fahrrad")%} {{states("sensor.travel_time_next_appointment_location_bike")}} {% elif is_state("input_select.next_appointment_travel_mode","Öffis")%} {{ states("sensor.travel_time_next_appointment_location_transit")}} {% elif is_state("input_select.next_appointment_travel_mode","Laufen")%} {{ states("sensor.travel_time_next_appointment_location_walking")}} {% endif %}' +#User Two +- platform: template + sensors: + cal_next_appointment_title_user_two: + friendly_name: Termin + value_template: "{{ states.calendar.stillhammersinagooglemailcom.attributes.message }}" + cal_next_appointment_location_user_two: + friendly_name: Ort + value_template: "{{ states.calendar.stillhammersinagooglemailcom.attributes.location }}" + cal_next_appointment_location_google_prepared_user_two: + value_template: '{% if is_state("sensor.cal_next_appointment_location_user_two","None") %}{{ "47.641223,68.803727"}}{% else %}{{ states.calendar.stillhammersinagooglemailcom.attributes.location }}{% endif %}' + friendly_name: Ort + cal_next_appointment_start_time_user_two: + friendly_name: Um + value_template: "{{ states.calendar.stillhammersinagooglemailcom.attributes.start_time or now() }}" + calc_leave_time_user_two: + value_template: '{% if is_state("input_select.next_appointment_travel_mode_user_two","Auto") %}{{(as_timestamp(states.calendar.stillhammersinagooglemailcom.attributes.start_time or now()) - states("sensor.travel_time_next_appointment_location_car_user_two") | int *60 - (states("input_number.leave_time_offset_user_two") | int * 60)) | timestamp_custom("%Y-%m-%d %H:%M")}} {% elif is_state("input_select.next_appointment_travel_mode_user_two","Fahrrad")%} {{(as_timestamp(states.calendar.stillhammersinagooglemailcom.attributes.start_time or now()) - states("sensor.travel_time_next_appointment_location_bike_user_two") | int *60 - (states("input_number.leave_time_offset_user_two") | int * 60)) | timestamp_custom("%Y-%m-%d %H:%M")}} {% elif is_state("input_select.next_appointment_travel_mode_user_two","Öffis")%} {{(as_timestamp(states.calendar.stillhammersinagooglemailcom.attributes.start_time or now()) - states("sensor.travel_time_next_appointment_location_transit_user_two") | int *60 - (states("input_number.leave_time_offset_user_two") | int * 60)) | timestamp_custom("%Y-%m-%d %H:%M")}} {% elif is_state("input_select.next_appointment_travel_mode_user_two","Laufen")%} {{(as_timestamp(states.calendar.stillhammersinagooglemailcom.attributes.start_time or now()) - states("sensor.travel_time_next_appointment_location_walking_user_two") | int *60 - (states("input_number.leave_time_offset_user_two") | int * 60)) | timestamp_custom("%Y-%m-%d %H:%M")}} {% endif %}' + friendly_name: Losfahren + travel_time_next_appointment_location_user_two: + friendly_name: Dauer + unit_of_measurement: min + value_template: '{% if is_state("input_select.next_appointment_travel_mode_user_two","Auto") %}{{states("sensor.travel_time_next_appointment_location_car_user_two")}} {% elif is_state("input_select.next_appointment_travel_mode_user_two","Fahrrad")%} {{states("sensor.travel_time_next_appointment_location_bike_user_two")}} {% elif is_state("input_select.next_appointment_travel_mode_user_two","Öffis")%} {{ states("sensor.travel_time_next_appointment_location_transit_user_two")}} {% elif is_state("input_select.next_appointment_travel_mode_user_two","Laufen")%} {{ states("sensor.travel_time_next_appointment_location_walking_user_two")}} {% endif %}' ################################################################# ## Sun ################################################################# diff --git a/switch.yaml b/switch.yaml index d91d5e2f..954df160 100644 --- a/switch.yaml +++ b/switch.yaml @@ -119,12 +119,12 @@ friendly_name: "Fernseher" command_on: 'JgAYAZWREzcSOBE4EhISExITEhISExI4ETgSNxITEhMSExETEhMSExI3EhMSExETEhMSExISEjgSExE4EjcSOBI3EjgSNxIABgWUkxM2EjgSNxITEhMSEhITEhMSNxI4EjcSExISEhMSExITEhISOBISEhMSExITEhISExI3EhMSOBE4EjcSOBI3EjgSAAYFk5QSNxI4EjcSExISEhMSExISEjgSNxI4EhISExITEhMRExITEjcSExITEhMRExITEhMSNxITEjcSOBI3EjcSOBI3EgAGBpWREzcSNxI4ERMSExITEhISExI4ETgSNxITEhMSEhITEhMSExI3EhMSEhITEhMSExETEjgSEhI4EjcSOBI3EjcSOBIADQU==' command_off: 'JgAYAZWREzcSOBE4EhISExITEhISExI4ETgSNxITEhMSExETEhMSExI3EhMSExETEhMSExISEjgSExE4EjcSOBI3EjgSNxIABgWUkxM2EjgSNxITEhMSEhITEhMSNxI4EjcSExISEhMSExITEhISOBISEhMSExITEhISExI3EhMSOBE4EjcSOBI3EjgSAAYFk5QSNxI4EjcSExISEhMSExISEjgSNxI4EhISExITEhMRExITEjcSExITEhMRExITEhMSNxITEjcSOBI3EjcSOBI3EgAGBpWREzcSNxI4ERMSExITEhISExI4ETgSNxITEhMSEhITEhMSExI3EhMSEhITEhMSExETEjgSEhI4EjcSOBI3EjcSOBIADQU==' - rosie_clean: - friendly_name: "Rosie Clean" + goldie_clean: + friendly_name: "Goldie Clean" command_on: 'JgBcAJOQEhESNRISEzQTEBI1ExEREpKQFBASNBQOFTQUEBI0ExETEJKQFA8TNBQQEzQUEBI1FA8SEZKQExESNRMQEzQUEBE2ExATEJKQExATNBMREzQTERI0FA8UAA0FAAAAAAAAAAAAAAAA' command_off: 'JgBcAJOQEhESNRISEzQTEBI1ExEREpKQFBASNBQOFTQUEBI0ExETEJKQFA8TNBQQEzQUEBI1FA8SEZKQExESNRMQEzQUEBE2ExATEJKQExATNBMREzQTERI0FA8UAA0FAAAAAAAAAAAAAAAA' - rosie_home: - friendly_name: "Rosie Home" + goldie_home: + friendly_name: "Goldie Home" command_on: 'JgBcAJKQEhIREhIREjUSEhIREjUSEZKQEhISERISETYREhISETUSEpKQERISERISEjUSERISETYREpKQEhESEhESEjUSEhESEjUSEZKQEhIREhISETUSEhISETUSAA0FAAAAAAAAAAAAAAAA' command_off: 'JgBcAJKQEhIREhIREjUSEhIREjUSEZKQEhISERISETYREhISETUSEpKQERISERISEjUSERISETYREpKQEhESEhESEjUSEhESEjUSEZKQEhIREhISETUSEhISETUSAA0FAAAAAAAAAAAAAAAA' markise: diff --git a/travis_secrets.yaml b/travis_secrets.yaml index 53c4d79b..af09a425 100644 --- a/travis_secrets.yaml +++ b/travis_secrets.yaml @@ -55,6 +55,8 @@ elmo_longitude: 0.00000 google_calendar_client_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxx" google_calendar_client_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +google_calendar_client_id_user_two: "xxxxxxxxxxxxxxxxxxxxxxxxxxx" +google_calendar_client_key_user_two: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" device_user_one: device_tracker.one device_user_two: device_tracker.two @@ -81,9 +83,12 @@ livingroom_yeelight_ip: 192.168.0.16 lower_bathroom_yeelight_ip: 192.168.0.17 google_maps_api_token: asdoijsaasdzfais6f712vfsAAATSCD767587as +google_maps_api_token_user_two: asdoijsaasdzfais6f712vfsAAATSCD767587as next_appointment_location_street_view_url: https://maps.googleapis.com/maps/api/streetview?size=600x300&location={{states.sensor.cal_next_appointment_location_google_prepared.state}}&key=asdoijsaasdzfais6f712vfsAAATSCD767587as next_appointment_location_static_map_url: https://maps.googleapis.com/maps/api/streetview?size=600x300&location={{states.sensor.cal_next_appointment_location_google_prepared.state}}&key=asdoijsaasdzfais6f712vfsAAATSCD767587as +next_appointment_location_street_view_url_user_two: https://maps.googleapis.com/maps/api/streetview?size=600x300&location={{states.sensor.cal_next_appointment_location_google_prepared.state}}&key=asdoijsaasdzfais6f712vfsAAATSCD767587as +next_appointment_location_static_map_url_user_two: https://maps.googleapis.com/maps/api/streetview?size=600x300&location={{states.sensor.cal_next_appointment_location_google_prepared.state}}&key=asdoijsaasdzfais6f712vfsAAATSCD767587as android_ip_webcam_door_ip: 192.168.0.10 android_ip_webcam_door_username: username