Skip to content

Commit

Permalink
Merge Roborock changes
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarb committed Feb 16, 2020
1 parent 3167b4d commit eebabed
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
15 changes: 15 additions & 0 deletions automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,18 @@
- data:
entity_id: light.bathroom_ceiling
service: light.turn_off
- id: '1577999538328'
alias: Ckean room
description: Start Roborock room cleaning triggered from Google Assistant (IFTTT)
trigger:
- event_data:
action: vacuum
platform: event
event_type: ifttt_webhook_received
condition: []
action:
- alias: ''
service: script.vacuum_room
data_template:
room_name: '{{ trigger.event.data.room }}'

7 changes: 6 additions & 1 deletion configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml


media_player:
- platform: philips_android_tv
name: TV
Expand All @@ -290,6 +289,12 @@ media_player:
shell_command:
turn_off_computer: ssh {{ ssh_user }} net rpc shutdown -I {{ ip }} -U {{ user }} -t {{ timeout }}

vacuum:
- platform: xiaomi_miio
name: Robocop
host: !secret roborock_ip
token: !secret roborock_token

# TODO
# Add more security:
# Customize camera picture (16:9?)
Expand Down
22 changes: 22 additions & 0 deletions scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,25 @@ turn_computer_off:
user: !secret shutdown_computer_user
ip: !secret computer_ip
timeout: 10

vacuum_room:
alias: Vacuum room
description: Start Roborock S6 room cleaning for a specific room
fields:
room_name:
description: Name of room to clean
example: kitchen
sequence:
- service: vacuum.send_command
data:
entity_id: vacuum.robocop
command: app_segment_clean
data_template:
params: >-
{% if 'kitchen' in room_name %}
[19]
{% elif 'living room' in room_name %}
[20]
{% else %}
[21]
{% endif %}
4 changes: 4 additions & 0 deletions travis_secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ mqtt_broker_password: mqtt_password
# Shutdown
shutdown_ssh_user: somerandomuser@localhost
shutdown_computer_user: WindowsUser%pAssWoRd

# Roborock S6
roborock_ip: 192.168.1.1340
roborock_token: abcdefababcdefababcdefababcdefab

0 comments on commit eebabed

Please sign in to comment.