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-07-24 17:12:07 +00:00
|
|
|
|
2018-01-02 00:00:45 +00:00
|
|
|
##############################################################################
|
|
|
|
### Automations - Detect when things are not right. Like any Good Watchdog.
|
|
|
|
##############################################################################
|
|
|
|
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
|
|
|
|
2020-05-23 20:34:20 +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:
|
2018-06-26 17:58:56 +00:00
|
|
|
- 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.",
|
2018-06-26 17:58:56 +00:00
|
|
|
"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"}}
|
2018-06-26 17:58:56 +00:00
|
|
|
image: >-
|
|
|
|
{{ [
|
|
|
|
"/config/www/custom_ui/floorplan/images/branding/neato.png"
|
|
|
|
] | random }}
|