Skip to content

Commit

Permalink
release 2022.01.01
Browse files Browse the repository at this point in the history
  • Loading branch information
Bram van Dartel committed Jan 19, 2022
1 parent 19c764e commit 06c75b6
Show file tree
Hide file tree
Showing 23 changed files with 1,401 additions and 575 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"context": "..",
"dockerFile": "Dockerfile",
"appPort": "8124:8123",
"appPort": "9123:8123",
"runArgs": [
"-e",
"GIT_EDTIOR='code --wait'"
Expand Down
45 changes: 45 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[{Dockerfile*,**.yml}]
indent_style = space
indent_size = 2

[{**.sh,rootfs/app/**,rootfs/etc/cont-finish.d/**,rootfs/cont-init.d/**,rootfs/etc/fix-attrs.d/**,rootfs/etc/services.d/**}]
indent_style = space
indent_size = 4

# 2 space indentation
[*.{js,json,y{a,}ml,html,cwl}]
indent_style = space
indent_size = 2

[*.{md,Rmd,rst}]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2

# 4 space indentation
[*.{py,java,r,R}]
indent_style = space
indent_size = 4

# Docstrings and comments use max_line_length = 79
[*.py]
max_line_length = 119

[docs/**.txt]
max_line_length = 79

# Tab indentation (no size specified)
[*.{bat},Makefile]
indent_style = tab
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

blank_issues_enabled: false
contact_links:
- name: Ask a question in the HASS community
- name: 🙋 Ask a question in the HASS community
url: https://community.home-assistant.io/t/garbage-pickup-date-mijnafvalwijzer-nl-custom-component/34631
about: If you are unsure where to go, then contacting the HASS community is recommended; Just ask!
about: If you are unsure where to go, then contacting the HASS community is recommended; Just ask!
63 changes: 36 additions & 27 deletions .github/ISSUE_TEMPLATE/issue.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,51 @@
name: 🚨 Report an issue
description: Report an issue.
body:
- type: markdown
- type: checkboxes
attributes:
value: |
This issue form is for reporting bugs.
label: Support guidelines
description: Please read the support guidelines before proceeding.
options:
- label: I've read the [support guidelines](https://github.com/xirixiz/homeassistant-afvalwijzer/blob/master/.github/SUPPORT.md)
required: true

- type: textarea
attributes:
label: Description
description: Please provide a brief description of the issue in 1-2 sentences.
validations:
required: true
attributes:
label: Issue
description: >-
Describe the issue you are experiencing here to communicate to the
maintainers. Tell us what you were trying to do and what happened.

Provide a clear and concise description of what the problem is.
- type: input
id: version
- type: textarea
attributes:
label: Expected behaviour
description: Please describe precisely what you'd expect to happen.
validations:
required: true

- type: textarea
attributes:
label: Which version has the issue?
description: >
Can be found in the About section.
- type: input
attributes:
label: What was the last working version?
description: >
If known, otherwise leave blank.
label: Actual behaviour
description: Please describe precisely what is actually happening.
validations:
required: true

- type: textarea
attributes:
label: Anything in the logs that might be useful?
description: For example, error message, or stack traces.
render: txt
label: Version
description: Please provide the HASS version, component version and system information (ARM, Docker, anything usefull).
value: |
* HASS version:
* Component version:
* Useful system info:
validations:
required: true

- type: textarea
attributes:
label: Additional information
description: >
If you have any additional information, use the field below.
Please note, you can attach screenshots or screen recordings here, by
dragging and dropping files in the field below.
label: HASS logs
description: Please provide the HASS logs (preferably with debug enabled).
value: |
* logger -> logs -> custom_components.afvalwijzer: debug in you configuration.yaml
validations:
required: true
29 changes: 29 additions & 0 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Support [![](https://isitmaintained.com/badge/resolution/xirixiz/homeassistant-afvalwijzer.svg)](https://isitmaintained.com/project/xirixiz/homeassistant-afvalwijzer)

## Reporting an issue

Please do a search in [open issues](https://github.com/xirixiz/homeassistant-afvalwijzer/issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed.

If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). Use a reaction in place of a "+1" comment.

:+1: - upvote

:-1: - downvote

If you cannot find an existing issue that describes your bug or feature, submit an issue using the guidelines below.

## Writing good bug reports and feature requests

File a single issue per problem and feature request.

* Do not enumerate multiple bugs or feature requests in the same issue.
* Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes.

The more information you can provide, the more likely someone will be successful reproducing the issue and finding a fix.

You are now ready to [create a new issue](https://github.com/xirixiz/homeassistant-afvalwijzer/issues/new/choose)!

## Closure policy

* Issues that don't have the information requested above (when applicable) will be closed immediately and the poster directed to the support guidelines.
* Issues that go a week without a response from original poster are subject to closure at my discretion.
2 changes: 1 addition & 1 deletion INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
postal_code: 1234AB # (required, default = '')
street_number: 5 # (required, default = '')
suffix: '' # (optional, default = '')
include_date_today: false # (optional, default = false) to take or not to take Today into account in the next pickup.
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"
Expand Down
79 changes: 42 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,30 @@
[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/custom-components/hacs)
[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg)](https://github.com/custom-components/hacs)
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
[![Open Source Love png1](https://badges.frapsoft.com/os/v1/open-source.png)](https://github.com/ellerbrock/open-source-badges/)

_Component to integrate with [mijnafvalwijzer][mijnafvalwijzer], [afvalstoffendienstkalender][afvalstoffendienstkalender] and [rova][rova]._
[![Open Source Love png1](https://badges.frapsoft.com/os/v1/open-source.png?v=103)](https://github.com/ellerbrock/open-source-badges/)

_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 |

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.

Expand Down Expand Up @@ -83,7 +104,7 @@ Here's an example of my own Home Asisstant config: https://github.com/xirixiz/ho
postal_code: 1234AB # (required, default = '')
street_number: 5 # (required, default = '')
suffix: '' # (optional, default = '')
include_date_today: false # (optional, default = false) to take or not to take Today into account in the next pickup.
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"
Expand All @@ -104,11 +125,11 @@ input_boolean:
###### AUTOMATION
```yaml
automation:
- alias: Afval - Herstel notificatie
- alias: Reset waste notification
trigger:
platform: state
entity_id: input_boolean.waste_moved
to: "on"
to: 'on'
for:
hours: 12
action:
Expand All @@ -117,24 +138,17 @@ automation:
- service: input_boolean.turn_on
entity_id: input_boolean.waste_reminder
- alias: Afval - Bevestig notificatie
- alias: Mark waste as moved from notification
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "MARK_WASTE_MOVED"
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
- service: notify.family
data:
title: 'Afval'
message: 'Afvaltype(n): {{ states.sensor.afvalwijzer_tomorrow_formatted.state }} zijn aan de straat gezet.'
data:
push:
badge: 0
- alias: Afval - Verzend notificatie - Tomorrow
- alias: Waste has not been moved
trigger:
platform: time_pattern
hours: "/1"
Expand All @@ -143,30 +157,24 @@ automation:
conditions:
- condition: state
entity_id: input_boolean.waste_moved
state: "off"
state: 'off'
- condition: state
entity_id: input_boolean.waste_reminder
state: "on"
state: 'on'
- condition: time
after: "18:00:00"
before: "23:00:00"
after: '18:00:00'
before: '23:00:00'
- condition: template
value_template: "{{ states('sensor.afvalwijzer_tomorrow_formatted') != 'Geen' }}"
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_formatted.state }} wordt opgehaald op: {{ (as_timestamp(now()) + (24*3600)) | timestamp_custom("%d-%m-%Y", True) }}!'
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"
title: "Afval verwerkt"
activationMode: "background"
authenticationRequired: no
destructive: yes
behavior: "default"
push:
badge: 5
badge: 0
category: 'afval'
```

***
Expand All @@ -175,8 +183,5 @@ automation:
[exampleimg2]: afvalwijzer_lovelace.png
[buymecoffee]: https://www.buymeacoffee.com/xirixiz
[buymecoffeebedge]: https://camo.githubusercontent.com/cd005dca0ef55d7725912ec03a936d3a7c8de5b5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275792532306d6525323061253230636f666665652d646f6e6174652d79656c6c6f772e737667
[mijnafvalwijzer]: https://mijnafvalwijzer.nl
[afvalstoffendienstkalender]: https://afvalstoffendienstkalender.nl
[rova]: https://www.rova.nl
[customupdater]: https://github.com/custom-components/custom_updater
[customupdaterbadge]: https://img.shields.io/badge/custom__updater-true-success.svg
File renamed without changes.
Loading

0 comments on commit 06c75b6

Please sign in to comment.