Skip to content

Fire an event when nzbget download completes#27763

Merged
MartinHjelmare merged 4 commits into
home-assistant:devfrom
chriscla:nzbget_download_notifier
Nov 4, 2019
Merged

Fire an event when nzbget download completes#27763
MartinHjelmare merged 4 commits into
home-assistant:devfrom
chriscla:nzbget_download_notifier

Conversation

@chriscla
Copy link
Copy Markdown
Contributor

@chriscla chriscla commented Oct 17, 2019

Description:

Raise the nzbget_downloaded_nzb event when a download completes. Event includes nzb name, category, and status.

Pull request with documentation for home-assistant.io: home-assistant/home-assistant.io#10838

Example automation:

- id: '1571277970615'
  alias: Toggle when TV download completes
  description: ''
  trigger:
  - event_data:
      category: tv
    event_type: nzbget_downloaded_nzb
    platform: event
  condition: []
  action:
  - data:
      entity_id: input_boolean.nzbget_test
    service: input_boolean.toggle

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • [No Change ] [The manifest file][manifest-docs] has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • [No Change] New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • [No Change] Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • [N/A] Tests have been added to verify that the new code works.

Comment thread homeassistant/components/nzbget/__init__.py Outdated
Comment thread homeassistant/components/nzbget/__init__.py Outdated
@chriscla chriscla requested a review from balloob October 19, 2019 04:13
Copy link
Copy Markdown
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! This is ok to merge once you have addressed the lint issues

@chriscla
Copy link
Copy Markdown
Contributor Author

@balloob -- I can't figure out why CheckFormat is failing. I have re-formatted manually and verified by running Black with the same options as in the pre-commit hook. Plus the commit worked. Sorry to bother you with this but any suggestions? Thanks!

Output:
(venv):~/code/home-assistant$ black homeassistant/components/nzbget/init.py
All done! ✨ 🍰 ✨
1 file left unchanged.

@chriscla chriscla force-pushed the nzbget_download_notifier branch from d6be0e2 to d6686f3 Compare October 30, 2019 13:44
@MartinHjelmare MartinHjelmare merged commit aaad8ea into home-assistant:dev Nov 4, 2019
@lock lock Bot locked and limited conversation to collaborators Nov 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants