Skip to content

Home Assistant plugin for rubbish collection information for St Albans council

Notifications You must be signed in to change notification settings

jshiell/homeassistant-stalbansrubbishcollections

Repository files navigation

Home Assistant - St Albans Rubbish Collection

Version hacs_badge

This is a simple integration to pull rubbish collection information from St Albans Council's notice board.

Widgets on a Lovelace dashboard

The screenshot uses the Mushroom Entity widget and the Metrology theme.

Installation

Via HACS

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

Or:

  1. Open the HACS panel in your Home Assistant frontend.
  2. Click the three dots in the top-right corner and select "Custom Repositories".
  3. Add a new custom repository:
    • URL: jshiell/homeassistant-stalbansrubbishcollections
    • Category: Integration
  4. Click "Save" and then click "Install" on the integration.

Manually

  1. Clone this repository.
  2. Copy custom_components/stalbansrubbishcollections into your config/custom_components directory.
  3. Restart Home Assistant.

Configuration

  1. Find your UPRN

  2. Add the integration, providing your UPRN.

You'll need some sensors to expose the state:

template:
  - sensor:
     - unique_id: rubbish_recycling_next
       state: "{{as_timestamp(state_attr('sensor.stalbans_rubbish_collection_<your uprn>', 'CollectDomesticRecycling')['next']) | timestamp_custom('%d/%m/%Y') }}"
       attributes:
         friendly_name: "Next recycling collection date"
  - sensor:
     - unique_id: rubbish_recycling_last
       state: "{{as_timestamp(state_attr('sensor.stalbans_rubbish_collection_<your uprn>', 'CollectDomesticRecycling')['last']) | timestamp_custom('%d/%m/%Y') }}"
       attributes:
         friendly_name: "Last recycling collection date"
  - sensor:
     - unique_id: rubbish_refuse_next
       state: "{{as_timestamp(state_attr('sensor.stalbans_rubbish_collection_<your uprn>', 'CollectDomesticRefuse')['next']) | timestamp_custom('%d/%m/%Y') }}"
       attributes:
         friendly_name: "Next refuse collection date"
  - sensor:
     - unique_id: rubbish_refuse_last
       state: "{{as_timestamp(state_attr('sensor.stalbans_rubbish_collection_<your uprn>', 'CollectDomesticRefuse')['last']) | timestamp_custom('%d/%m/%Y') }}"
       attributes:
         friendly_name: "Last refuse collection date"
  - sensor:
     - unique_id: rubbish_food_next
       state: "{{as_timestamp(state_attr('sensor.stalbans_rubbish_collection_<your uprn>', 'CollectDomesticFood')['next']) | timestamp_custom('%d/%m/%Y') }}"
       attributes:
         friendly_name: "Next food waste collection date"
  - sensor:
     - unique_id: rubbish_food_last
       state: "{{as_timestamp(state_attr('sensor.stalbans_rubbish_collection_<your uprn>', 'CollectDomesticFood')['last']) | timestamp_custom('%d/%m/%Y') }}"
       attributes:
         friendly_name: "Last food waste collection date"
  - sensor:
     - unique_id: rubbish_garden_next
       state: "{{as_timestamp(state_attr('sensor.stalbans_rubbish_collection_<your uprn>', 'CollectDomesticPaidGarden')['next']) | timestamp_custom('%d/%m/%Y') }}"
       attributes:
         friendly_name: "Next garden waste collection date"
  - sensor:
     - unique_id: rubbish_garden_last
       state: "{{as_timestamp(state_attr('sensor.stalbans_rubbish_collection_<your uprn>', 'CollectDomesticPaidGarden')['last']) | timestamp_custom('%d/%m/%Y') }}"
       attributes:
         friendly_name: "Last garden waste collection date"

About

Home Assistant plugin for rubbish collection information for St Albans council

Topics

Resources

Stars

Watchers

Forks

Languages