├── .github
├── pr-labeler.yml
├── workflows
│ ├── pr-labeler.yml
│ ├── draft-release.yml
│ ├── combined.yml
│ ├── release.yml
│ └── codeql-analysis.yml
├── PULL_REQUEST_TEMPLATE.md
├── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
├── helpers
│ └── update_manifest.py
└── release-drafter.yml
├── custom_components
└── homewizard_energy
│ ├── const.py
│ ├── strings.json
│ ├── translations
│ ├── nl.json
│ └── en.json
│ ├── manifest.json
│ ├── config_flow.py
│ └── __init__.py
├── hacs.json
├── .gitignore
├── README.md
└── LICENCE
/.github/pr-labeler.yml:
--------------------------------------------------------------------------------
1 | 'pr: bugfix': ['bugfix/*', 'fix/*']
2 | 'pr: enhancement': enhancement/*
3 | 'pr: refactor': refactor/*
4 | 'pr: new-feature': ['feature/*', 'new-feature/*']
--------------------------------------------------------------------------------
/custom_components/homewizard_energy/const.py:
--------------------------------------------------------------------------------
1 | """Constants for the Homewizard Energy integration."""
2 |
3 | # Set up.
4 | DOMAIN = "homewizard_energy"
5 | TARGET_DOMAIN = "homewizard"
6 |
--------------------------------------------------------------------------------
/hacs.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "HomeWizard Energy",
3 | "render_readme": true,
4 | "domains": ["sensor", "switch"],
5 | "homeassistant": "2022.2.2",
6 | "iot_class": "local_polling",
7 | "zip_release": true,
8 | "filename": "homewizard_energy.zip"
9 | }
10 |
--------------------------------------------------------------------------------
/.github/workflows/pr-labeler.yml:
--------------------------------------------------------------------------------
1 | name: PR Labeler
2 | on:
3 | pull_request:
4 | types: [opened]
5 |
6 | jobs:
7 | pr-labeler:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: TimonVS/pr-labeler-action@v3
11 | env:
12 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--------------------------------------------------------------------------------
/custom_components/homewizard_energy/strings.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Homewizard Energy",
3 | "config": {
4 | "step": {
5 | "confirm": {
6 | "description": "[%key:common::config_flow::description::confirm_setup%]"
7 | }
8 | },
9 | "abort": {
10 | "manual_not_supported": "This integration has been moved to core. Please remove 'homewizard_energt' from 'custom_integrations'"
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/custom_components/homewizard_energy/translations/nl.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Homewizard Energy",
3 | "config": {
4 | "step": {
5 | "confirm": {
6 | "description": "[%key:common::config_flow::description::confirm_setup%]"
7 | }
8 | },
9 | "abort": {
10 | "manual_not_supported": "Deze integratie is verplaatst naar core. Verwijder homewizard_energy uit 'custom_integrations'"
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/custom_components/homewizard_energy/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "codeowners": ["@DCSBL"],
3 | "config_flow": false,
4 | "documentation": "https://github.com/DCSBL/ha-homewizard-energy",
5 | "domain": "homewizard_energy",
6 | "iot_class": "local_polling",
7 | "issue_tracker": "https://github.com/DCSBL/ha-homewizard-energy/issues",
8 | "name": "HomeWizard Energy",
9 | "requirements": ["aiohwenergy==0.8.0"],
10 | "version": "0.0.0"
11 | }
12 |
--------------------------------------------------------------------------------
/custom_components/homewizard_energy/translations/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Homewizard Energy",
3 | "config": {
4 | "step": {
5 | "confirm": {
6 | "description": "[%key:common::config_flow::description::confirm_setup%]"
7 | }
8 | },
9 | "abort": {
10 | "manual_not_supported": "This integration has been moved to core. Please remove 'homewizard_energt' from 'custom_integrations'"
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | * **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
2 |
3 |
4 |
5 | * **What is the current behavior?** (You can also link to an open issue here)
6 |
7 |
8 |
9 | * **What is the new behavior (if this is a feature change)?**
10 |
11 |
12 |
13 | * **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)
14 |
15 |
16 |
17 | * **Other information**:
18 |
19 |
--------------------------------------------------------------------------------
/.github/workflows/draft-release.yml:
--------------------------------------------------------------------------------
1 | # The release drafter uses ../release-drafter.yml to create a release document
2 | # based on the pull requests and its labels
3 |
4 | name: Draft release
5 |
6 | on:
7 | push:
8 | branches:
9 | - main
10 | - development
11 | - test
12 |
13 | jobs:
14 | update_release_draft:
15 | runs-on: ubuntu-latest
16 | steps:
17 | - uses: release-drafter/release-drafter@v5
18 | id: create_release
19 | env:
20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: enhancement
6 | assignees:
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
22 |
--------------------------------------------------------------------------------
/.github/workflows/combined.yml:
--------------------------------------------------------------------------------
1 | name: "Validation And Formatting"
2 | on:
3 | pull_request:
4 |
5 | jobs:
6 | ci:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v2
10 | name: Download repo
11 | with:
12 | fetch-depth: 0
13 | - uses: actions/setup-python@v2
14 | name: Setup Python
15 | - uses: actions/cache@v2
16 | name: Cache
17 | with:
18 | path: |
19 | ~/.cache/pip
20 | key: custom-component-ci
21 | - uses: hacs/action@main
22 | with:
23 | CATEGORY: integration
24 | - uses: KTibow/ha-blueprint@stable
25 | name: CI
26 | with:
27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 |
--------------------------------------------------------------------------------
/.github/helpers/update_manifest.py:
--------------------------------------------------------------------------------
1 | """Update the manifest file."""
2 | """Idea from https://github.com/hacs/integration/blob/main/manage/update_manifest.py"""
3 |
4 | import sys
5 | import json
6 | import os
7 |
8 |
9 | def update_manifest():
10 | """Update the manifest file."""
11 | version = "0.0.0"
12 | for index, value in enumerate(sys.argv):
13 | if value in ["--version", "-V"]:
14 | version = sys.argv[index + 1]
15 |
16 | with open(f"{os.getcwd()}/custom_components/homewizard_energy/manifest.json") as manifestfile:
17 | manifest = json.load(manifestfile)
18 |
19 | manifest["version"] = version
20 |
21 | with open(
22 | f"{os.getcwd()}/custom_components/homewizard_energy/manifest.json", "w"
23 | ) as manifestfile:
24 | manifestfile.write(json.dumps(manifest, indent=4, sort_keys=True))
25 |
26 |
27 | update_manifest()
28 |
--------------------------------------------------------------------------------
/custom_components/homewizard_energy/config_flow.py:
--------------------------------------------------------------------------------
1 | """Config flow for Homewizard Energy."""
2 | from __future__ import annotations
3 |
4 | import logging
5 | from typing import Any
6 |
7 | from homeassistant import config_entries
8 | from homeassistant.data_entry_flow import FlowResult
9 |
10 | from .const import DOMAIN
11 |
12 | _LOGGER = logging.getLogger(__name__)
13 |
14 | class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
15 | """Handle a config flow for P1 meter."""
16 |
17 | VERSION = 1
18 |
19 | def __init__(self):
20 | """Set up the instance."""
21 | _LOGGER.debug("config_flow __init__")
22 |
23 | async def async_step_user(
24 | self, user_input: dict[str, Any] | None = None
25 | ) -> FlowResult:
26 | """Handle a flow initiated by the user."""
27 |
28 | _LOGGER.debug("config_flow async_step_user")
29 |
30 | return self.async_abort(reason="manual_not_supported")
31 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | # Python cache
5 | __pycache__
6 | *.pyc
7 |
8 | # Other
9 | *.uuid
10 | *.conf
11 | *.db
12 | *.db-journal
13 | *.log
14 | *.noload
15 | *.txt
16 | *.sqlite
17 | *.xml
18 | *.backup
19 | life360.sh
20 | .ip_authenticated.yaml
21 | ip_bans.yaml
22 | .config_entries.json
23 | *.google.token
24 | .google.token
25 | .ring_cache.pickle
26 | .spotify-token-cache
27 | .storage
28 | abodepy_cache.pickle
29 | camera_recording.py
30 | home-assistant.env
31 | home-assistant.*
32 | known_devices.yaml
33 | entity_registry.yaml
34 | secrets.yaml
35 | google_calendars.yaml
36 | SERVICE_ACCOUNT.json
37 | components
38 | deps
39 | tts
40 | www/icons
41 | www/floorplans
42 | www/community
43 | custom_components/hacs
44 | downloads
45 | icloud
46 | dlib_faces
47 | dlib_nofaces
48 | dlib_known_faces
49 | dlib_unknown_faces
50 | .cloud
51 | *.pickle
52 | .pc-session
53 | google*.deb
54 | .homekit.state
55 | © 2020 GitHub, Inc.
56 | Terms
57 | Privacy
58 | Security
59 | Status
60 | Help
61 | Contact GitHub
62 | Pricing
63 | API
64 | Training
65 | Blog
66 | About
--------------------------------------------------------------------------------
/custom_components/homewizard_energy/__init__.py:
--------------------------------------------------------------------------------
1 | """The Homewizard Energy integration."""
2 | import logging
3 |
4 | from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
5 | from homeassistant.core import HomeAssistant
6 |
7 | from .const import DOMAIN, TARGET_DOMAIN
8 |
9 | _LOGGER = logging.getLogger(__name__)
10 |
11 |
12 | async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
13 | """Set up Homewizard Energy from a config entry."""
14 | hass.data.setdefault(DOMAIN, {})
15 |
16 | _LOGGER.debug("__init__ async_setup_entry")
17 | _LOGGER.warning("Sending config entry to core...")
18 |
19 | hass.async_create_task(
20 | hass.config_entries.flow.async_init(
21 | TARGET_DOMAIN,
22 | context={"source": SOURCE_IMPORT, "old_config_entry_id": entry.entry_id},
23 | data=entry.data,
24 | )
25 | )
26 |
27 | return True
28 |
29 |
30 | async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
31 | """Unload a config entry."""
32 | _LOGGER.debug("__init__ async_unload_entry")
33 |
34 | return True
35 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help improve this integraion
4 | title: ''
5 | labels: bug
6 | assignees:
7 | ---
8 |
9 |
10 | **Describe the bug**
11 |
12 | *A clear and concise description of what the bug is.*
13 |
14 | **Environment (please complete the following information)**
15 |
16 | - Integration version:
17 | - Home Assistant version:
18 | - Python version (if known):
19 |
20 | **To Reproduce**
21 |
22 | Eg. Steps to reproduce the behavior:
23 | 1. Go to '...'
24 | 2. Click on '....'
25 | 3. Scroll down to '....'
26 | 4. See error
27 |
28 | **Expected behavior**
29 |
30 | *A clear and concise description of what you expected to happen.*
31 |
32 | **Screenshots**
33 |
34 | *If applicable, add screenshots to help explain your problem.*
35 |
36 | **Log Output**
37 |
38 | *If applicable*
39 | To get more output, enable `debug` output
40 | ```yaml
41 | # configuration.yaml
42 | logger:
43 | default: info
44 | logs:
45 | custom_components.homewizard_energy: debug
46 | ```
47 |
48 | **Additional context**
49 |
50 | *Add any other context about the problem here.*
51 |
52 |
--------------------------------------------------------------------------------
/.github/release-drafter.yml:
--------------------------------------------------------------------------------
1 | name-template: '$RESOLVED_VERSION'
2 | tag-template: '$RESOLVED_VERSION'
3 | change-template: '- #$NUMBER $TITLE @$AUTHOR'
4 | sort-direction: ascending
5 | categories:
6 | - title: 'Breaking changes'
7 | label: 'Breaking Change'
8 |
9 | - title: 'New features'
10 | label: 'pr: new-feature'
11 |
12 | - title: 'Enhancements'
13 | label: 'pr: enhancement'
14 |
15 | - title: 'Refactor'
16 | label: 'pr: refactor'
17 |
18 | - title: 'Bug Fixes'
19 | label: 'pr: bugfix'
20 |
21 | include-labels:
22 | - 'Breaking Change'
23 | - 'pr: enhancement'
24 | - 'pr: new-feature'
25 | - 'pr: bugfix'
26 | - 'pr: refactor'
27 |
28 | version-resolver:
29 | minor:
30 | labels:
31 | - 'Breaking Change'
32 | - 'pr: enhancement'
33 | - 'pr: dependency-update'
34 | - 'pr: new-feature'
35 | patch:
36 | labels:
37 | - 'pr: bugfix'
38 | default: minor
39 |
40 | template: |
41 | [](https://github.com/DCSBL/ha-homewizard-energy/releases/$RESOLVED_VERSION)
42 |
43 | $CHANGES
44 |
45 | ## Links
46 |
47 | - [HA Integration forum](https://community.home-assistant.io/t/custom-component-homewizard-energy-wifi-p1-meter/227441)
48 | - [Tweakers forum](https://gathering.tweakers.net/forum/list_messages/2002754/last)
49 | - [Product page](https://www.homewizard.nl/energy)
50 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | # Combine files and upload it as zip to the release
2 | # Original file from https://github.com/hacs/integration/blob/main/.github/workflows/release.yml
3 |
4 | name: Release
5 |
6 | on:
7 | release:
8 | types: [published]
9 |
10 | jobs:
11 | release_zip_file:
12 | name: Prepare release asset
13 | runs-on: ubuntu-latest
14 | steps:
15 | - name: Check out repository
16 | uses: actions/checkout@v2
17 |
18 | - name: Set up Python
19 | uses: actions/setup-python@v2
20 | with:
21 | python-version: 3.8
22 |
23 | - name: "Set version number"
24 | run: |
25 | python3 ${{ github.workspace }}/.github/helpers/update_manifest.py --version ${GITHUB_REF##*/}
26 |
27 | - name: Combine ZIP
28 | run: |
29 | cd ${{ github.workspace }}/custom_components/homewizard_energy
30 | zip homewizard_energy.zip -r ./
31 |
32 | - name: Get release
33 | id: get_release
34 | uses: bruceadams/get-release@v1.2.2
35 | env:
36 | GITHUB_TOKEN: ${{ github.token }}
37 |
38 | - name: Upload Release Asset
39 | id: upload-release-asset
40 | uses: actions/upload-release-asset@v1
41 | env:
42 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43 | with:
44 | upload_url: ${{ steps.get_release.outputs.upload_url }}
45 | asset_path: ${{ github.workspace }}/custom_components/homewizard_energy/homewizard_energy.zip
46 | asset_name: homewizard_energy.zip
47 | asset_content_type: application/zip
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # HomeWizard Energy Integration (Archived)
3 | The old custom integration for the [HomeWizard Energy Products](https://www.homewizard.nl/energie). This repo is archived for references and if you want to run the migration.
4 |
5 | ## Integration added to core :tada:
6 | This integration is available in Core. This custom integration won't be maintained and eventually removed. Click here to read more and install the core integration: https://home-assistant.io/integrations/homewizard/
7 |
8 |
9 |
10 | # Migration
11 | This custom integration only exists to allow migration of current configurations. If you had a `pre-0.13.0` version in use and you install this version, it will automaticly migrate to core. **Make sure to have Home Assistant 2022.2.2 or later installed.**
12 |
13 | ## FAQ
14 | 1. **What if I have any problems with the integration?**
15 | If the issues is with the core integration, you can open an issue [here](https://github.com/home-assistant/core/issues/new?assignees=&labels=&template=bug_report.yml). If you have an issue with the custom integration, you can open an issue [here](https://github.com/DCSBL/ha-homewizard-energy/issues)
16 | 2. **Where is `gas_timestamp` and `meter_model`?**
17 | Meter model is renamed to `Smart Meter Model`. Gas timestamp is removed because it is the same as 'last updated total gas'. You can get it back with a template sensor:
18 | ```
19 | # configuration.yaml
20 | sensor:
21 | - platform: template
22 | sensors:
23 | p1_meter_gas_timestamp:
24 | friendly_name: "Gas Timestamp"
25 | device_class: timestamp
26 | value_template: "{{ states.sensor.p1_meter__total_gas.last_updated }}"
27 | ```
28 | Replace `p1_meter__total_gas` to use the correct entity id. Now you can use `sensor.p1_meter_gas_timestamp`
29 |
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | # For most projects, this workflow file will not need changing; you simply need
2 | # to commit it to your repository.
3 | #
4 | # You may wish to alter this file to override the set of languages analyzed,
5 | # or to provide custom queries or build logic.
6 | #
7 | # ******** NOTE ********
8 | # We have attempted to detect the languages in your repository. Please check
9 | # the `language` matrix defined below to confirm you have the correct set of
10 | # supported CodeQL languages.
11 | #
12 | name: "CodeQL"
13 |
14 | on:
15 | push:
16 | branches: [ main ]
17 | pull_request:
18 | # The branches below must be a subset of the branches above
19 | branches: [ main ]
20 | schedule:
21 | - cron: '26 13 * * 2'
22 |
23 | jobs:
24 | analyze:
25 | name: Analyze
26 | runs-on: ubuntu-latest
27 |
28 | strategy:
29 | fail-fast: false
30 | matrix:
31 | language: [ 'python' ]
32 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33 | # Learn more:
34 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
35 |
36 | steps:
37 | - name: Checkout repository
38 | uses: actions/checkout@v2
39 |
40 | # Initializes the CodeQL tools for scanning.
41 | - name: Initialize CodeQL
42 | uses: github/codeql-action/init@v1
43 | with:
44 | languages: ${{ matrix.language }}
45 | # If you wish to specify custom queries, you can do so here or in a config file.
46 | # By default, queries listed here will override any specified in a config file.
47 | # Prefix the list here with "+" to use these queries and those in the config file.
48 | # queries: ./path/to/local/query, your-org/your-repo/queries@main
49 |
50 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51 | # If this step fails, then you should remove it and run the build manually (see below)
52 | - name: Autobuild
53 | uses: github/codeql-action/autobuild@v1
54 |
55 | # ℹ️ Command-line programs to run using the OS shell.
56 | # 📚 https://git.io/JvXDl
57 |
58 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59 | # and modify them (or add more) to build your code if your project
60 | # uses a compiled language
61 |
62 | #- run: |
63 | # make bootstrap
64 | # make release
65 |
66 | - name: Perform CodeQL Analysis
67 | uses: github/codeql-action/analyze@v1
68 |
--------------------------------------------------------------------------------
/LICENCE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2018 Paulus Schoutsen
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
--------------------------------------------------------------------------------