logo smart home family kruse

Kruse Smart Home

Easy living in our smart home & Garden

Home Assistant garbage pickup notification

Home Assistant garbage pickup notification

15 December 2022

Jan-Willem

1. Introduction

In an earlier article we explained how to setup a Home Assistant dashboard card with garbage pickup dates. This article describes how to setup a garbage pickup notification the evening before the waste bin needs to be put alongside the street to be emptied.

The notification setup described in this article is based on the usage of the Home Assistant integration AfvalWijzer, but if you use a different integration a similar process can be followed to implement a garbage pickup notification. The automatic notification will be created via a Home Assistant Automation.

2. Requirements

The following is required to setup the notification:

3. Configuration

No specific configuration is required as long as the Afvalwijzer integration is configured correctly (see article Home Assistant dashboard card with garbage pickup dates).

4. Create a basic garbage pickup notification Automation

Follow the following steps:

  1. Head over to Settings > Automations & Scenes, create a new empty automation and give it a name, for example “Notification – Waste bins”
  2. Click on “Add action” and select “Call service”
  3. Enter pushover at the Service entry field and select the Pushover user connection to use.


    Note: if multiple users need to receive the same message it is handier to define a group within your Pushover account.

  4. Define the notification content

    1. Enter the body of the message. As we will define that HTML codes need to be interpreted in step 4 the following customisations are possible:
      • <b>word</b> – display word in bold
      • <i>word</i> – display word in italics
      • <u>word</u> – display word underlined
      • <font color=”blue”>word</font> – display word in blue text (most colors and hex codes permitted)
      • <a href=”http://example.com/”>word</a> – display word as a tappable link to http://example.com/
    2. Enter the title of the notification
    3. Skipped as not used
    4. Options as described in the Pushover API:
      • attachment – an image attachment to send with the message
      • device – the name of one of your devices to send just to that device instead of all devices
      • html – set to 1 to enable HTML parsing
      • priority – a value of -2-10 (default), 1, or 2
      • sound – the name of a supported sound to override your default sound choice
      • timestamp – a Unix timestamp of a time to display instead of when our API received it
      • url – a supplementary URL to show with your message
      • url_title – a title for the URL specified as the url parameter, otherwise just the URL is shown

  5. Save the Automation and run it

    The following garbage pickup notification will be displayed on the mobile device:

 

5. Create a more sophisticated garbage pickup notification

I wanted to have one notification which:

  • provides message indicating which waste container to put alongside the road
  • provides image of the container for the specific waste type

My setup will send one of the following notification depending on the waste type the evening before the waste container needs to be put alongside the street.

Setting up this notification is not possible via the visual editor for the Automation, but requires YAML code.

  1. Head over to Settings > Automations & Scenes and create a new automation by clicking on the “Create automation” button at the lower right.
  2. In the upper right click the 3 dots and select Edit in YAML

  3. Remove existing content of the editor and copy/paste the following code:

    The code above will not work straight away for your situation. At least the yellow highlighted lines require modifications. Likely some other lines also. The images I used are available for download: 20221216 images waste containers
Article by <a href="https://smarthome.familykruse.eu/author/iamjwk/" target="_self">Jan-Willem</a>

Article by Jan-Willem

Position

Writen by the website owner

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *