Monthly Archives: October 2019

Home Assistant – How to configure the SMTP component (Gmail)

Morning guys!

Today im going to show you how to configure the SMTP-component so that you can send e-

mails from Home Assistant! My other article shows some examples of what you can use the SMTP-component for.

  1. The first thing that you have to do is enable the SMTP-component – start by copying the code below and add it to your configuration.yaml file.

Make sure to change sender, username, password and recipient before you save your configuration. If you use another provider than gmail you will have to change the smtp-server and port also.

Another heads-up is that if you have 2-factor authentication enabked on your Google account you’ll need to create an app password to use instead of your ordinary password – how do i create an app password?

 

SMTP-component:

notify:
  - name: gmail
    platform: smtp
    server: smtp.gmail.com
    port: 587
    timeout: 15
    sender: FROM@gmail.com
    encryption: starttls
    username: FROM@gmail.com
    password: SECRETPASSWORD
    recipient:
      - TO@gmail.com
    sender_name: Home Assistant

 

2. Restart Home Assistant (make sure that you don’t get any errors after the reboot)

Done! Now you can use this in your automations to notify you about stuff!

This article covers how you can send notifications base on the state of your robot vacuum

 

 

Home Assistant – Roborock Automations

Hello Roborock enthusiasts!

In this little guide i will share with you how to get the most basic notifications from your Roborock vacuum using automations.yaml in Home Assistant!

I will add more automations as i keep using the Roborock S5, so stay put on some more useful automations!

 

You will need the following:

Make sure to change notify.ios_device to your own notification service.

And then add the following to your automations.yaml file and restart Home Assistant.

Cleaning started:

- id: 'Vacuum_started'
  alias: Vacuum Started Notification
  trigger:
  - entity_id: vacuum.xiaomi_vacuum_cleaner
    from: docked
    platform: state
    to: cleaning
  condition: []
  action:
  - data:
      message: Roborock started to clean!
    service: notify.ios_device

Cleaning completed:

- id: 'Vacuum_complete'
  alias: Vacuum Complete Notification
  trigger:
  - entity_id: vacuum.xiaomi_vacuum_cleaner
    platform: state
    to: docked
  condition: []
  action:
  - data:
      message: Cleaning complete - Charging
    service: notify.ios_device

 

For more information about how to get started with Home Assistant click the link below:

https://www.home-assistant.io/getting-started/