Files
zorruno-homeassistant/packages/waste_collection.yaml
T
2026-07-24 18:55:12 +12:00

121 lines
4.0 KiB
YAML

#:########################################################################################:#
# Council Waste Collection Package #
#:########################################################################################:#
#
# TITLE:
# Council Waste Collection
#
# FILE:
# packages/waste_collection.yaml
#
# VERSION:
# V1.4 2026-07-22
#
# VERSION HISTORY:
# V1.4 2026-07-22
# - Fixed waste type names to match Auckland Council source output (recycling, food scraps)
# - Resolved P013-F019: Recycling and food-waste sensors were unknown due to type mismatch
#
# V1.3 2026-07-22
# - Moved the source identifier to !secret council_name.
# - Changed source documentation and MQTT unique IDs to generic wording.
#
# V1.2 2026-07-22
# - Moved the source area number to !secret council_area.
# - Changed package and schedule display names to generic council wording.
#
# V1.1 2026-07-20
# - Added source setup, schedule, MQTT, and maintenance documentation.
#
# V1.0
# - Initial council schedules and MQTT bin-status sensors.
#
# PURPOSE:
# Provides council rubbish, recycling, and food-waste collection schedules,
# plus independent MQTT sensors indicating whether bins are out.
#
# DEPENDENCY:
# Requires the Waste Collection Schedule custom integration and its configured
# council source.
#
# AREA NUMBER SETUP:
# - Open the council rubbish and recycling collection-day finder.
# - Select the property address.
# - Store the displayed assessment number as council_area in secrets.yaml.
# - Source documentation:
# https://github.com/mampfes/hacs_waste_collection_schedule
#
# SCHEDULE SENSORS:
# - Types are rubbish, recycling, and food scraps (matching Auckland source output).
# - Each sensor returns one upcoming collection with a one-day lead time.
# - details_format is upcoming and add_days_to adds relative-day text.
#
# MQTT BIN-OUT SENSORS:
# - These sensors are independent of the council collection schedules.
# - An external publisher must send status to the configured MQTT topics.
# - Payloads remain raw sensor strings such as "true"; these are not binary
# sensor entities and no boolean conversion is performed here.
#
# CURRENT STATUS:
# - As of 2026-07-20, the rubbish schedule resolves correctly.
# - Recycling and food-waste report unknown; review the source type names when
# investigating those schedules.
# - As of 2026-07-22, fixed type names to match Auckland Council source output.
#
#:########################################################################################:#
waste_collection_schedule:
sources:
- name: !secret council_name
args:
area_number: !secret council_area
sensor:
- platform: waste_collection_schedule
#source_index: 0
name: "Council Waste"
details_format: upcoming
count: 1
leadtime: 1
#value_template: VALUE_TEMPLATE
#date_template: DATE_TEMPLATE
add_days_to: true
#event_index: EVENT_INDEX
types:
- rubbish
- platform: waste_collection_schedule
#source_index: 0
name: "Council Recycling"
details_format: upcoming
count: 1
leadtime: 1
#value_template: VALUE_TEMPLATE
#date_template: DATE_TEMPLATE
add_days_to: true
#event_index: EVENT_INDEX
types:
- recycling
- platform: waste_collection_schedule
#source_index: 0
name: "Council Food-Waste"
details_format: upcoming
count: 1
leadtime: 1
#value_template: VALUE_TEMPLATE
#date_template: DATE_TEMPLATE
add_days_to: true
#event_index: EVENT_INDEX
types:
- food scraps
mqtt:
sensor:
- unique_id: council_red_waste_bin_out
name: "Red Waste Bin Out"
state_topic: "viewroad-status/rubbishbinstatus/redbin-out"
- unique_id: council_green_recycling_bin_out
name: "Green Recycling Bin Out"
state_topic: "viewroad-status/rubbishbinstatus/greenbin-out"
- unique_id: council_food_waste_bin_out
name: "Food Waste Bin Out"
state_topic: "viewroad-status/rubbishbinstatus/foodbin-out"