Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from jnewland/bring-back-roomba
Bring back the roomba
- Loading branch information
Showing
14 changed files
with
186 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
automation: | ||
- alias: Day mode | ||
trigger: | ||
- platform: state | ||
entity_id: input_select.mode | ||
to: Morning | ||
- platform: state | ||
entity_id: binary_sensor.master_bath_motion | ||
from: 'off' | ||
to: 'on' | ||
- platform: state | ||
entity_id: | ||
- sensor.jphone_11_pro_battery_state | ||
- sensor.katie_s_iphone_battery_state | ||
to: 'Not Charging' | ||
for: | ||
seconds: 30 | ||
condition: | ||
condition: and | ||
conditions: | ||
- condition: state | ||
entity_id: input_select.mode | ||
state: Morning | ||
- condition: template | ||
value_template: | | ||
{{ | ||
(states.device_tracker.jphone_11_pro.state == "not_home" or states.sensor.jphone_11_pro_battery_state.state == "Not Charging") and | ||
(states.device_tracker.katie_s_iphone.state == "not_home" or states.sensor.katie_s_iphone_battery_state.state == "Not Charging") | ||
}} | ||
action: | ||
- service: input_select.select_option | ||
entity_id: input_select.mode | ||
data: | ||
option: Day | ||
|
||
- alias: Mode away to day | ||
trigger: | ||
- platform: state | ||
entity_id: lock.front_door | ||
to: 'unlocked' | ||
- platform: state | ||
entity_id: binary_sensor.garage | ||
from: 'off' | ||
to: 'on' | ||
- platform: state | ||
entity_id: binary_sensor.gate | ||
from: 'off' | ||
to: 'on' | ||
- platform: zone | ||
entity_id: device_tracker.jphone_11_pro | ||
zone: zone.home | ||
event: enter | ||
- platform: zone | ||
entity_id: device_tracker.katie_s_iphone | ||
zone: zone.home | ||
event: enter | ||
condition: | ||
condition: state | ||
entity_id: input_select.mode | ||
state: Away | ||
action: | ||
- service: input_select.select_option | ||
entity_id: input_select.mode | ||
data: | ||
option: Day |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
automation: | ||
- alias: Morning mode | ||
trigger: | ||
- platform: state | ||
entity_id: binary_sensor.closet_motion | ||
from: 'off' | ||
to: 'on' | ||
- platform: state | ||
entity_id: binary_sensor.master_bath_motion | ||
from: 'off' | ||
to: 'on' | ||
- platform: state | ||
entity_id: | ||
- sensor.jphone_11_pro_battery_state | ||
- sensor.katie_s_iphone_battery_state | ||
to: 'Not Charging' | ||
for: | ||
seconds: 30 | ||
condition: | ||
condition: and | ||
conditions: | ||
- condition: state | ||
entity_id: input_select.mode | ||
state: Sleeping | ||
- condition: time | ||
after: '05:00:00' | ||
before: '12:00:00' | ||
action: | ||
- service: input_select.select_option | ||
data: | ||
entity_id: input_select.mode | ||
option: Morning | ||
|
||
- alias: Run default morning actions | ||
trigger: | ||
- platform: state | ||
entity_id: input_select.mode | ||
to: Morning | ||
action: | ||
- service: light.turn_off | ||
entity_id: group.master | ||
- service: input_number.set_value | ||
data: | ||
entity_id: input_number.brightness | ||
value: 255 | ||
- service: light.turn_on | ||
entity_id: | ||
- group.speakers | ||
- light.cabinets | ||
- service: alarm_control_panel.alarm_disarm | ||
entity_id: alarm_control_panel.alarm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
script: | ||
find_roomba: | ||
sequence: | ||
- service: vacuum.locate | ||
entity_id: vacuum.downstairs_roomba | ||
noop: | ||
sequence: | ||
- service: homeassistant.update_entity | ||
entity_id: binary_sensor.updater | ||
automation: | ||
- alias: Find the roomba in the morning | ||
trigger: | ||
- platform: state | ||
entity_id: input_select.mode | ||
to: Morning | ||
condition: | ||
condition: template | ||
value_template: | | ||
{{ not is_state_attr("vacuum.downstairs_roomba", "status", "Charging") }} | ||
action: | ||
- service: script.ask_about_turning_on | ||
data_template: | ||
entity_id: script.find_roomba | ||
message: > | ||
The downstairs roomba is lost. Should I make it beep? | ||
confirmation_message: found the roomba | ||
|
||
- alias: Empty the roomba in the morning | ||
trigger: | ||
- platform: state | ||
entity_id: input_select.mode | ||
to: Morning | ||
condition: | ||
condition: template | ||
value_template: | | ||
{{ is_state_attr("vacuum.downstairs_roomba", "bin_full", True) }} | ||
action: | ||
- service: script.ask_about_turning_on | ||
data_template: | ||
entity_id: script.noop | ||
apns_collapse_id: roomba-full | ||
message: The downstairs roomba is full. Did you empty it out? | ||
confirmation_message: emptied the roomba | ||
|
||
- alias: Run roomba in reading mode | ||
trigger: | ||
- platform: state | ||
entity_id: input_select.mode | ||
to: Reading | ||
action: | ||
- service: vacuum.turn_on | ||
entity_id: vacuum.downstairs_roomba | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters