dannytsang / homeassistant-config

🏡 My Home Assistant Configs.
https://dannytsang.com
32 stars 0 forks source link

Household Bin Collection 🗑 #40

Open dannytsang opened 2 years ago

dannytsang commented 2 years ago

Create integrations that would help with bin collection at home. My local council collects different types of pre-sorted waste on alternate weeks. image image

Goals

Credit to @jcallaghan for the idea.

dannytsang commented 2 years ago

Dashboard card using auto-entities to show / hide the bin card only when it is bin day +/- the notification offset.

It uses the mushroom template card to set the bin icon colour and text with the type of bin to take out.

card:
  type: custom:mushroom-template-card
  primary: Take the bin out
  secondary: >-
    {% if is_state_attr('calendar.bins','message','Recycling Waste') %}Recycling
    Bin{% elif is_state_attr('calendar.bins','message','General Waste') %}Black
    Bin{% endif%}
  icon: >-
    {% if is_state_attr('calendar.bins','message','Recycling Waste')
    %}mdi:trash-can-outline{% elif is_state_attr('calendar.bins','message','General
    Waste') %}mdi:trash-can{% endif%}
  icon_color: >-
    {% if is_state_attr('calendar.bins','message','Recycling Waste') %}green{%
    elif is_state_attr('calendar.bins','message','General Waste') %}black{%
    endif%}
  multiline_secondary: false
filter:
  include:
    - entity_id: binary_sensor.bin_collection_due
      state: 'on'
show_empty: false
sort:
  method: state
  ignore_case: true
dannytsang commented 2 years ago

Need to think of a sensor to tell the bin has been emptied.

dannytsang commented 5 months ago

BLE distance sensor is unstable and fluctuates. Need to look into some noise filtering or averaging sensor to see if the bin is away from the house or not.