Skip to content

jarivanb/HomeAssistant-RecycleApp

 
 

Repository files navigation

Home Assistant RecycleApp Integration

hacs_badge Quality Gate Status

Integrate RecycleApp into your Home Assistant.

Installation

  • Install HACS Repository:

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

  • Restart Home Assistant
  • Install the Integration:

Open your Home Assistant instance and start setting up a new integration.

  • Complete the setup process:

image

Date Format

By default, dates are in Home Assistant date format: %Y-%m-%d

You can customize the format in the configure of the device:

image

The formatting is based on Python date formatting.

You can also set the Date Format as TIMESTAMP to display relative dates, such as "in 2 days" or "next week". This option uses Home Assistant's built-in timestamp formatting and localization features.

Usage Samples

Dashboard with next pickups

With entity-filter: entity-filter

type: entity-filter
entities:
  - sensor.pmc
  - sensor.papier
  - sensor.dechets_non_recyclables_sac
  - sensor.dechets_biodegradables
state_filter:
  - operator: <=
    value: 1
    attribute: days
card:
  type: entities

Templates

templates

Tomorrow's Pickup(s)

Template helper

tomorrows

Code:

{% set tomorrow_pickups = namespace(entities=[]) %}
{% set collect_types = ['sensor.dechets_non_recyclables_sac', 'sensor.pmc', 'sensor.papier'] %}
{% for collect_type in collect_types %}
  {% if state_attr(collect_type, 'days') == 1 %}
    {% set tomorrow_pickups.entities = tomorrow_pickups.entities + [state_attr(collect_type, 'friendly_name')] %}
  {% endif %}
{% endfor %}
{{ tomorrow_pickups.entities |join(' - ') }}

Notification

alias: Waste collection
description: ""
trigger:
  - platform: time
    at: "19:00:00"
condition:
  - condition: template
    value_template: >-
      {% if is_state('sensor.tomorrow_s_pickup_s', '') %}false{% else %}true{%
      endif %}
action:
  - service: notify.mobile_app_poco_f5
    data:
      message: Tomorrow waste collection of {{states('sensor.tomorrow_s_pickup_s')}}
mode: single

Thanks to @MathiasVandePol for the sample.

Bug, ideas?

If some collections are missing, you find a bug or have enhancement ideas don't hesitate to open an issue.

About

Integrate RecycleApp into your Home Assistant.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%