All Projects → xirixiz → homeassistant-afvalwijzer

xirixiz / homeassistant-afvalwijzer

Licence: MIT license
Provides sensors for some Dutch waste collectors

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to homeassistant-afvalwijzer

Home-Assistant-custom-components-DPC-Alert
Italy Meteo-hydro alert and hydrogeological phenomena Civil Protection (Protezione Civile). In this custom component you can find the vigilance Bulletin and the Bulletin of national hydrogeological and hydraulic criticalities. They allow to check whether in your current location there will be criticalities/warnings related to weather-hydrogeolog…
Stars: ✭ 31 (-73.95%)
Mutual labels:  sensor, homeassistant, hacs
home-assistant-miele
Miele integration for Home assistant
Stars: ✭ 101 (-15.13%)
Mutual labels:  homeassistant, hacs
home-assistant-p2000
🚒 This component tracks P2000 emergency events in The Netherlands.
Stars: ✭ 45 (-62.18%)
Mutual labels:  homeassistant, hacs
homeassistant-jlrincontrol
An integration for JLR InControl to Home Assistant
Stars: ✭ 34 (-71.43%)
Mutual labels:  homeassistant, hacs
ical-sensor-homeassistant
an iCal Sensor for Home Assistant
Stars: ✭ 42 (-64.71%)
Mutual labels:  sensor, hacs
thermal
Thermal Vision Sensor and Camera for Home Assistant
Stars: ✭ 43 (-63.87%)
Mutual labels:  homeassistant, hacs
HomeAssistant-Cupertino-Icons
Apple SF Symbols icons for Home Assistant! (3000+ icons)
Stars: ✭ 100 (-15.97%)
Mutual labels:  homeassistant, hacs
ha-gismeteo
Gismeteo Weather Provider for Home Assistant
Stars: ✭ 84 (-29.41%)
Mutual labels:  sensor, hacs
charger-card
A lovelace card for electrical vehicle (EV) home chargers and charging robots.
Stars: ✭ 57 (-52.1%)
Mutual labels:  homeassistant, hacs
ha-eskom-loadshedding
Fetches loadshedding data from Eskom
Stars: ✭ 48 (-59.66%)
Mutual labels:  homeassistant, hacs
home-assistant-theme-outline
🎨 Home Assistant Theme: Outline
Stars: ✭ 20 (-83.19%)
Mutual labels:  homeassistant, hacs
read your meter
Home Assistant sensor to read water meter
Stars: ✭ 27 (-77.31%)
Mutual labels:  sensor, hacs
HADailySensor
Sensor for Home Assistant that gets reset at midnight
Stars: ✭ 20 (-83.19%)
Mutual labels:  sensor, homeassistant
Anniversaries
Anniversary Countdown Sensor for Home Assistant
Stars: ✭ 128 (+7.56%)
Mutual labels:  sensor, hacs
home-assistant-omnik-inverter
Read the current, daily and total Wh from your Omnik Inverter via local network (no cloud!)
Stars: ✭ 45 (-62.18%)
Mutual labels:  homeassistant, hacs
custom-brand-icons
Custom brand icons for Home Assistant
Stars: ✭ 242 (+103.36%)
Mutual labels:  homeassistant, hacs
ha-iaquk
Indoor Air Quality Sensor Component for Home Assistant
Stars: ✭ 57 (-52.1%)
Mutual labels:  sensor, hacs
uptime-card
Minimalistic uptime card for Home Assistant Lovelace UI
Stars: ✭ 152 (+27.73%)
Mutual labels:  sensor, hacs
midea-ac-py
This is a library to allow communicating to a Midea appliance via the Midea cloud.
Stars: ✭ 72 (-39.5%)
Mutual labels:  homeassistant, hacs
ha-sengledapi
Home Assistant Integration for Sengled Bulbs. This is a custom component to allow control of Sengled Bulbs in Homeassistant using the unofficial Sengled API. Please note this mimics the Sengled app and therefore Sengled may cut off access at anytime.
Stars: ✭ 85 (-28.57%)
Mutual labels:  homeassistant, hacs

Afvalwijzer

BuyMeCoffee custom_updater hacs_badge hacs_badge made-with-python Open Source Love png1 Validation And Formatting

Component to integrate with the following collectors.

Collector
mijnafvalwijzer
afvalstoffendienstkalender (all)
rova
acv
almere
areareiniging
avalex
avri
bar
hellendoorn
meerlanden
meppel
rad
twentemilieu
waardlanden
westland
ximmio
reinis
alkmaar
alphenaandenrijn
berkelland
blink
cranendonck
cyclus
dar
denhaag
gad
hvc
lingewaard
middelburgngen
montfoort
peelenmaas
prezero
purmerend
rmn
schouwenand
spaarnelanden
sudwestfryslan
suez
venray
voorschoten
waalre
zrd
eemsdelta (iCalendar)
rd4
deafvalapp

This custom component dynamically creates sensor.afvalwijzer_* items. For me personally the items created are gft, restafval, papier, pmd and kerstbomen. Look in the states overview in the developer tools in Home Assistant what the sensor names for your region are and modify where necessary.

This component will set up the following platforms.

Platform Description
sensor Show waste pickup dates for mijnafvalwijzer.nl, afvalstoffendienstkalender.nl or rova.nl.

example

The second row sorts the waste items by date using the following lovelace code

  - type: 'custom:auto-entities'
    card:
      type: glance
    filter:
      include:
        - entity_id: sensor.afvalwijzer_gft
        - entity_id: sensor.afvalwijzer_papier
        - entity_id: sensor.afvalwijzer_pmd
        - entity_id: sensor.afvalwijzer_restafval
    sort:
      attribute: days_until_collection_date
      method: attribute
      numeric: true

More information on the reminders (ios in this case):

Installation

  1. Using your tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called afvalwijzer.
  4. Download all the files from the custom_components/afvalwijzer/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant before further configuration.
  7. Look at the Example Configuration section for further configuration.
  8. Restart Home Assistant again when configuration is done to activate the configuration.

Using your HA configuration directory (folder) as a starting point you should now also have this:

custom_components/afvalwijzer/__init__.py
custom_components/afvalwijzer/manifest.json
custom_components/afvalwijzer/sensor.py
CUSTOM COMPONENT USAGE

https://github.com/home-assistant/example-custom-config/tree/master/custom_components/example_sensor

LOGLEVEL

In order to extend the log level, modify the following (configuration.yaml probably)

logger:
  default: info
  logs:
    custom_components.afvalwijzer: debug

EXAMPLE CONFIGURATION

Here's an example of my own Home Asisstant config: https://github.com/xirixiz/home-assistant

SENSOR - CONFIGURATION.YAML
  sensor:
    - platform: afvalwijzer
      provider: mijnafvalwijzer        # (required, default = mijnafvalwijzer) either choose mijnafvalwijzer, afvalstoffendienstkalender or rova
      postal_code: 1234AB              # (required, default = '')
      street_number:  5                # (required, default = '')
      suffix: ''                       # (optional, default = '')
      exclude_pickup_today: true       # (optional, default = true) to take or not to take Today into account in the next pickup.
      default_label: geen              # (optional, default = geen) label if no date found
      id: ''                           # (optional, default = '') use if you'd like to have multiple waste pickup locations in HASS
      exclude_list: ''                 # (optional, default = '') comma separated list of wast types (case ignored). F.e. "papier, gft"
INPUT BOOLEAN (FOR AUTOMATION)
input_boolean:
  waste_moved:
    name: Waste has been moved
    initial: 'off'
    icon: mdi:delete-empty
  waste_reminder:
    name: Waste reminder enabled
    initial: 'on'
AUTOMATION
automation:
  - alias: Reset waste notification
    trigger:
      platform: state
      entity_id: input_boolean.waste_moved
      to: 'on'
      for:
        hours: 12
    action:
      - service: input_boolean.turn_off
        entity_id: input_boolean.waste_moved
      - service: input_boolean.turn_on
        entity_id: input_boolean.waste_reminder

  - alias: Mark waste as moved from notification
    trigger:
      platform: event
      event_type: ios.notification_action_fired
      event_data:
        actionName: MARK_WASTE_MOVED
    action:
      - service: input_boolean.turn_on
        entity_id: input_boolean.waste_moved

  - alias: Waste has not been moved
    trigger:
      platform: time_pattern
      hours: "/1"
    condition:
      condition: and
      conditions:
        - condition: state
          entity_id: input_boolean.waste_moved
          state: 'off'
        - condition: state
          entity_id: input_boolean.waste_reminder
          state: 'on'
        - condition: time
          after: '18:00:00'
          before: '23:00:00'
        - condition: template
          value_template: "{{ states('sensor.afvalwijzer_tomorrow') != 'geen' }}"
    action:
      - service: notify.family
        data:
          title: "Afval"
          message: 'Het is vandaag - {{ now().strftime("%d-%m-%Y") }}. Afvaltype(n): {{ states.sensor.afvalwijzer_tomorrow.state }} wordt opgehaald op: {{ (as_timestamp(now()) + (24*3600)) | timestamp_custom("%d-%m-%Y", True) }}!'
          data:
            actions:
              - action: "MARK_WASTE_MOVED" # The key you are sending for the event
                title: "Afval buiten gezet" # The button title

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].