From bcac19ab69b9e9a5b74a9db167aa75a871c84a0a Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Mon, 21 Nov 2016 19:42:06 +0000 Subject: [PATCH] Added in Some Garadget Goodness! --- Misc Stuff.md | 13 --------- automation/detect_wasted_electricity.yaml | 21 ++++++++++++++ automation/ifttt_printer.yaml | 26 +++++++++++++++++ automation/switches.yaml | 8 ++++++ configuration.yaml | 14 +++++++++- customize/garadget.yaml | 8 ++++++ group/Indoor_Outdoor.yaml | 2 +- group/garage.yaml | 11 ++++++++ group/holiday.yaml | 26 ----------------- group/views.yaml | 9 +++--- input_boolean.yaml | 34 ----------------------- sensor/garadget.yaml | 25 +++++++++++++++++ 12 files changed, 117 insertions(+), 80 deletions(-) create mode 100755 automation/detect_wasted_electricity.yaml create mode 100755 automation/ifttt_printer.yaml create mode 100755 automation/switches.yaml create mode 100755 customize/garadget.yaml create mode 100755 group/garage.yaml delete mode 100755 group/holiday.yaml delete mode 100755 input_boolean.yaml create mode 100755 sensor/garadget.yaml diff --git a/Misc Stuff.md b/Misc Stuff.md index 3603f4a3..79d99990 100755 --- a/Misc Stuff.md +++ b/Misc Stuff.md @@ -1,16 +1,3 @@ -- alias: turn_it_off_after_10m - trigger: - - platform: state - entity_id: light.bedroom - state: 'on' - for: '00:10:00' - condition: - ... - action: - - service: light.turn_off - data_template: - entity_id: "{{ trigger.entity_id }}" - - alias: 'Get Random Time' trigger: diff --git a/automation/detect_wasted_electricity.yaml b/automation/detect_wasted_electricity.yaml new file mode 100755 index 00000000..0a7084f3 --- /dev/null +++ b/automation/detect_wasted_electricity.yaml @@ -0,0 +1,21 @@ +############################################################################## +### Detect when things are on and forgotten about. +############################################################################## + +- alias: Printer on for more than 35 minutes + trigger: + - platform: state + entity_id: switch.printer_outlet + state: 'on' + for: '00:35:00' + +#Turn it off twice for good measure! + action: + - service: switch.turn_off + data_template: + entity_id: "{{ trigger.entity_id }}" + - delay: 00:01:00 + - service: switch.turn_off + data_template: + entity_id: "{{ trigger.entity_id }}" + \ No newline at end of file diff --git a/automation/ifttt_printer.yaml b/automation/ifttt_printer.yaml new file mode 100755 index 00000000..3859b5c4 --- /dev/null +++ b/automation/ifttt_printer.yaml @@ -0,0 +1,26 @@ +################################### +## Turn on/off Printer via ALexa/IFTTT event. Turn off automatically after 20 minutes +################################### + +- alias: 'IFTTT Turn Printer on' + trigger: + - platform: event + event_type: printer_on + + action: + - service: switch.turn_on + entity_id: switch.printer_outlet + - delay: 00:20:00 + - service: switch.turn_off + entity_id: switch.printer_outlet + + +- alias: 'IFTTT Turn Printer off' + trigger: + - platform: event + event_type: printer_off + + action: + - service: switch.turn_off + entity_id: switch.printer_outlet + diff --git a/automation/switches.yaml b/automation/switches.yaml new file mode 100755 index 00000000..09f05733 --- /dev/null +++ b/automation/switches.yaml @@ -0,0 +1,8 @@ +Switches: + entities: + - switch.halloween_lights_den + - switch.halloween_lights_dining_room + - switch.foyer_outlet + - switch.kitchen_Accents + - switch.printer_outlet + \ No newline at end of file diff --git a/configuration.yaml b/configuration.yaml index ef6eaca3..2f9310cc 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -76,7 +76,19 @@ climate: media_player: platform: cast host: 192.168.10.105 - + +cover: + platform: garadget + covers: + 3c003a001151353338363333: + username: !secret garadget_username + password: !secret garadget_password + name: Garadget Large + 2a003f001751353432393433: + username: !secret garadget_username + password: !secret garadget_password + name: Garadget Small + sensor: !include_dir_merge_list sensor automation: !include_dir_merge_list automation scene: !include_dir_merge_list scene diff --git a/customize/garadget.yaml b/customize/garadget.yaml new file mode 100755 index 00000000..fb935860 --- /dev/null +++ b/customize/garadget.yaml @@ -0,0 +1,8 @@ +sensor.garadget_small_time_in_state: + icon: mdi:timer-sand +sensor.garadget_small_wifi_signal_strength: + icon: mdi:wifi +sensor.garadget_large_time_in_state: + icon: mdi:timer-sand +sensor.garadget_large_wifi_signal_strength: + icon: mdi:wifi \ No newline at end of file diff --git a/group/Indoor_Outdoor.yaml b/group/Indoor_Outdoor.yaml index 89ace247..2c4b1497 100755 --- a/group/Indoor_Outdoor.yaml +++ b/group/Indoor_Outdoor.yaml @@ -16,4 +16,4 @@ Interior Lights: Outdoor Lights: entities: - light.outdoor_foyer - - light.Outdoor_bathroom \ No newline at end of file + - light.outdoor_bathroom \ No newline at end of file diff --git a/group/garage.yaml b/group/garage.yaml new file mode 100755 index 00000000..ca8dd77f --- /dev/null +++ b/group/garage.yaml @@ -0,0 +1,11 @@ +garage_doors: + name: Garage doors + entities: + - cover.garadget_large + - sensor.garadget_large_status + - sensor.garadget_large_time_in_state + - sensor.garadget_large_wifi_signal_strength + - cover.garadget_small + - sensor.garadget_small_status + - sensor.garadget_small_time_in_state + - sensor.garadget_small_wifi_signal_strength \ No newline at end of file diff --git a/group/holiday.yaml b/group/holiday.yaml deleted file mode 100755 index 4668c6a6..00000000 --- a/group/holiday.yaml +++ /dev/null @@ -1,26 +0,0 @@ -Holiday lights: - entities: - - switch.halloween_lights_den - - switch.halloween_lights_dining_room - - switch.foyer_outlet - - - ######################################### - ### Pumpkin lights used in ### - ### holiday / late night helper & ### - ### Good_night ### - ######################################### - -Halloween_Flasher: - entities: - - light.couch_1 - - light.couch_2 - - light.couch_tv - - light.den_lamp - - light.foyer_door - - light.foyer - - light.office_lamp - - light.sconce_1 - - light.sconce_2 - - light.sconce_3 - - light.sconce_4 \ No newline at end of file diff --git a/group/views.yaml b/group/views.yaml index 91bfd9d9..ec4b8f9b 100755 --- a/group/views.yaml +++ b/group/views.yaml @@ -8,10 +8,8 @@ default_view: - group.family - group.weather - group.amps - - group.holiday - group.Bedroom_lights - group.Kitchen_lights - - switch.kitchen_accents - group.Dinette_lights - group.living_room_lights - group.living_room_accents @@ -24,6 +22,8 @@ default_view: - group.garage_lights - group.outdoor_pool_lights - group.outdoor_lights + - group.switches + - group.garage_doors Lights: view: yes @@ -33,10 +33,8 @@ Lights: - group.amps - group.interior_lights - group.outdoor_lights - - group.holiday_lights - group.Bedroom_lights - group.Kitchen_lights - - switch.kitchen_accents - group.Dinette_lights - group.living_room_lights - group.living_room_accents @@ -47,7 +45,7 @@ Lights: - group.office_lights - group.garage_lights - group.outdoor_pool_lights - + - group.switches Info: view: yes @@ -57,6 +55,7 @@ Info: - group.home_modes - group.network - group.sensors + - group.garage_doors - sun.sun - media_player.roku_1gj361038190 - media_player.roku_1gs3ac111661 diff --git a/input_boolean.yaml b/input_boolean.yaml deleted file mode 100755 index a5da69ae..00000000 --- a/input_boolean.yaml +++ /dev/null @@ -1,34 +0,0 @@ -################################### -## Guest Mode Override -################################### -# Medicine_Reminder: - # name: Medicine Reminder - # icon: mdi:pill - # initial: off - -Trash_Reminder: - Name: Trash Day Reminder - icon: mdi:delete - initial: off - -Chore_Reminder: - name: Chore Day Reminder - icon: mdi:human-male-female - initial: off - -################################### -## School Vacation Override -################################### -no_school: - name: No School - icon: mdi:school - initial: off - -################################### -## Guest Mode Override -################################### -guest_mode: - name: Guest Mode - icon: mdi:account-alert - initial: off - \ No newline at end of file diff --git a/sensor/garadget.yaml b/sensor/garadget.yaml new file mode 100755 index 00000000..016b75e8 --- /dev/null +++ b/sensor/garadget.yaml @@ -0,0 +1,25 @@ +- platform: template + sensors: + garadget_small_status: + friendly_name: 'State of the door' + value_template: '{{ states.cover.garadget_small.state }}' + garadget_small_time_in_state: + friendly_name: 'Since' + value_template: '{{ states.cover.garadget_small.attributes["time in state"] }}' + garadget_small_wifi_signal_strength: + friendly_name: 'WiFi strength' + value_template: '{{ states.cover.garadget_small.attributes["wifi signal strength (dB)"] }}' + unit_of_measurement: 'dB' + +- platform: template + sensors: + garadget_large_status: + friendly_name: 'State of the door' + value_template: '{{ states.cover.garadget_large.state }}' + garadget_large_time_in_state: + friendly_name: 'Since' + value_template: '{{ states.cover.garadget_large.attributes["time in state"] }}' + garadget_large_wifi_signal_strength: + friendly_name: 'WiFi strength' + value_template: '{{ states.cover.garadget_large.attributes["wifi signal strength (dB)"] }}' + unit_of_measurement: 'dB' \ No newline at end of file