Home-AssistantConfig/config/packages/neato.yaml

91 lines
3.4 KiB
YAML
Raw Normal View History

2018-01-02 00:00:45 +00:00
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
2020-05-22 17:43:39 +00:00
# Neato Support for D7 Connected Botvac - control my [Neato Vacuum](https://amzn.to/2kqnnqu) with Home Assistant.
2018-01-02 00:00:45 +00:00
#-------------------------------------------
2018-01-02 00:00:45 +00:00
##############################################################################
### Automations - Tweet out When neato is heading back to his Dock for recharging.
2018-01-02 00:00:45 +00:00
##############################################################################
automation:
- alias: 'Vacuum -Tweet'
trigger:
- platform: state
2020-05-22 17:43:39 +00:00
entity_id: vacuum.carlo_neato
to: 'cleaning'
2018-01-02 00:00:45 +00:00
condition:
- condition: template
2020-05-22 17:43:39 +00:00
value_template: "{{ states.vacuum.carlo_neato.attributes.battery_level |int < 20 }}"
2018-01-02 00:00:45 +00:00
- condition: template
value_template: >
{%- if states.automation.vacuum_tweet.attributes.last_triggered -%}
{{ (as_timestamp(now()) - as_timestamp(states.automation.vacuum_tweet.attributes.last_triggered)) > 15000 }}
{%- else -%}
true
{%- endif -%}
2018-01-02 00:00:45 +00:00
action:
- service: script.tweet_engine_image
2018-01-02 00:00:45 +00:00
data_template:
tweet: >
{{ [
2020-05-22 17:43:39 +00:00
"#Neato returning to base. Vacuumed up a TON. (https://amzn.to/2CKHZya)",
2018-01-02 00:00:45 +00:00
"Everyday I have the Neato Botvac go out and clean the house on its own.",
"Since we have a cat that sheds all day, we have Neato Vacuum go out daily to clean.",
"Time to recharge the Neato Vacuum."
2020-05-22 17:43:39 +00:00
] | random + " Battery Level:{{states.vacuum.carlo_neato.attributes.battery_level }} #Robots"}}
image: >-
{{ [
"/config/www/custom_ui/floorplan/images/branding/neato.png"
] | random }}
##############################################################################
### Automations - Help Neato!
##############################################################################
- alias: 'Help Neato'
trigger:
- platform: state
entity_id: vacuum.carlo_neato
to: 'error'
- platform: event
event_type: event_did_someone_help_neato
condition:
- condition: state
entity_id: vacuum.carlo_neato
state: 'error'
action:
- wait_template: >-
{{ states.group.family.state == 'home' }}
- service: script.speech_engine
data_template:
value1: >
{% set error = states.vacuum.carlo_neato.attributes['status'] %}
{{ [
"Neato is asking for help. The error reported is " ~ error + " . Please find him and help him.",
"Please be nice and help Neato. He is complaining about " ~ error + ".",
"If you don't want to vacuum, you need to help Neato. He is complaining about " ~ error +" and needs help.",
"Something is wrong with Neato. Please find him and help him. I have detected a " ~ error + " error."
] | random }}
- service: vacuum.locate
entity_id: vacuum.carlo_neato
- service: script.notify_engine
data_template:
title: 'Help Neato'
value1: "{{ states.vacuum.carlo_neato.attributes['status'] }}"
who: 'family'
ios_category: 'camera'
camera_entity: 'camera.carlo_neato_cleaning_map'
content_type: 'jpeg'
apns_id: 'neato-carlo_neato_cleaning_map'
- delay: 00:20:00
- event: event_did_someone_help_neato