pax_global_header 0000666 0000000 0000000 00000000064 14636552303 0014521 g ustar 00root root 0000000 0000000 52 comment=5255e86da0a324c364ba832573dd3257e901bab6
sensor-state-data-2.18.1/ 0000775 0000000 0000000 00000000000 14636552303 0015150 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/.all-contributorsrc 0000664 0000000 0000000 00000000470 14636552303 0021002 0 ustar 00root root 0000000 0000000 {
"projectName": "sensor-state-data",
"projectOwner": "bluetooth-devices",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 80,
"commit": true,
"commitConvention": "angular",
"contributors": [],
"contributorsPerLine": 7,
"skipCi": true
}
sensor-state-data-2.18.1/.editorconfig 0000664 0000000 0000000 00000000444 14636552303 0017627 0 ustar 00root root 0000000 0000000 # http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf
[*.bat]
indent_style = tab
end_of_line = crlf
[LICENSE]
insert_final_newline = false
[Makefile]
indent_style = tab
sensor-state-data-2.18.1/.flake8 0000664 0000000 0000000 00000000055 14636552303 0016323 0 ustar 00root root 0000000 0000000 [flake8]
exclude = docs
max-line-length = 88
sensor-state-data-2.18.1/.github/ 0000775 0000000 0000000 00000000000 14636552303 0016510 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/.github/FUNDING.yml 0000664 0000000 0000000 00000000036 14636552303 0020324 0 ustar 00root root 0000000 0000000 github: ["bluetooth-devices"]
sensor-state-data-2.18.1/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 14636552303 0020673 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/.github/ISSUE_TEMPLATE/1-bug_report.md 0000664 0000000 0000000 00000000422 14636552303 0023521 0 ustar 00root root 0000000 0000000 ---
name: Bug report
about: Create a report to help us improve
labels: bug
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
**Additional context**
Add any other context about the problem here.
sensor-state-data-2.18.1/.github/ISSUE_TEMPLATE/2-feature-request.md 0000664 0000000 0000000 00000000672 14636552303 0024502 0 ustar 00root root 0000000 0000000 ---
name: Feature request
about: Suggest an idea for this project
labels: enhancement
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Additional context**
Add any other context or screenshots about the feature request here.
sensor-state-data-2.18.1/.github/labels.toml 0000664 0000000 0000000 00000003515 14636552303 0020653 0 ustar 00root root 0000000 0000000 [breaking]
color = "ffcc00"
name = "breaking"
description = "Breaking change."
[bug]
color = "d73a4a"
name = "bug"
description = "Something isn't working"
[dependencies]
color = "0366d6"
name = "dependencies"
description = "Pull requests that update a dependency file"
[github_actions]
color = "000000"
name = "github_actions"
description = "Update of github actions"
[documentation]
color = "1bc4a5"
name = "documentation"
description = "Improvements or additions to documentation"
[duplicate]
color = "cfd3d7"
name = "duplicate"
description = "This issue or pull request already exists"
[enhancement]
color = "a2eeef"
name = "enhancement"
description = "New feature or request"
["good first issue"]
color = "7057ff"
name = "good first issue"
description = "Good for newcomers"
["help wanted"]
color = "008672"
name = "help wanted"
description = "Extra attention is needed"
[invalid]
color = "e4e669"
name = "invalid"
description = "This doesn't seem right"
[nochangelog]
color = "555555"
name = "nochangelog"
description = "Exclude pull requests from changelog"
[question]
color = "d876e3"
name = "question"
description = "Further information is requested"
[removed]
color = "e99695"
name = "removed"
description = "Removed piece of functionalities."
[tests]
color = "bfd4f2"
name = "tests"
description = "CI, CD and testing related changes"
[wontfix]
color = "ffffff"
name = "wontfix"
description = "This will not be worked on"
[discussion]
color = "c2e0c6"
name = "discussion"
description = "Some discussion around the project"
[hacktoberfest]
color = "ffa663"
name = "hacktoberfest"
description = "Good issues for Hacktoberfest"
[answered]
color = "0ee2b6"
name = "answered"
description = "Automatically closes as answered after a delay"
[waiting]
color = "5f7972"
name = "waiting"
description = "Automatically closes if no answer after a delay"
sensor-state-data-2.18.1/.github/workflows/ 0000775 0000000 0000000 00000000000 14636552303 0020545 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/.github/workflows/ci.yml 0000664 0000000 0000000 00000004011 14636552303 0021657 0 ustar 00root root 0000000 0000000 name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- uses: pre-commit/action@v3.0.0
# Make sure commit messages follow the conventional commits convention:
# https://www.conventionalcommits.org
commitlint:
name: Lint Commit Messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
test:
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: snok/install-poetry@v1
- name: Install Dependencies
run: poetry install
- name: Test with Pytest
run: poetry run pytest --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
release:
runs-on: ubuntu-latest
environment: release
if: github.ref == 'refs/heads/main'
needs:
- test
- lint
- commitlint
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# Run semantic release:
# - Update CHANGELOG.md
# - Update version in code
# - Create git tag
# - Create GitHub release
# - Publish to PyPI
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@v7.34.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
sensor-state-data-2.18.1/.github/workflows/hacktoberfest.yml 0000664 0000000 0000000 00000000534 14636552303 0024116 0 ustar 00root root 0000000 0000000 name: Hacktoberfest
on:
schedule:
# Run every day in October
- cron: "0 0 * 10 *"
# Run on the 1st of November to revert
- cron: "0 13 1 11 *"
jobs:
hacktoberfest:
runs-on: ubuntu-latest
steps:
- uses: browniebroke/hacktoberfest-labeler-action@v2.2.0
with:
github_token: ${{ secrets.GH_PAT }}
sensor-state-data-2.18.1/.github/workflows/issue-manager.yml 0000664 0000000 0000000 00000001340 14636552303 0024026 0 ustar 00root root 0000000 0000000 name: Issue Manager
on:
schedule:
- cron: "0 0 * * *"
issue_comment:
types:
- created
issues:
types:
- labeled
pull_request_target:
types:
- labeled
workflow_dispatch:
jobs:
issue-manager:
runs-on: ubuntu-latest
steps:
- uses: tiangolo/issue-manager@0.4.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
{
"answered": {
"message": "Assuming the original issue was solved, it will be automatically closed now."
},
"waiting": {
"message": "Automatically closing. To re-open, please provide the additional information requested."
}
}
sensor-state-data-2.18.1/.github/workflows/labels.yml 0000664 0000000 0000000 00000000774 14636552303 0022542 0 ustar 00root root 0000000 0000000 name: Sync Github labels
on:
push:
branches:
- main
paths:
- ".github/**"
jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install labels
run: pip install labels
- name: Sync config with Github
run: labels -u ${{ github.repository_owner }} -t ${{ secrets.GITHUB_TOKEN }} sync -f .github/labels.toml
sensor-state-data-2.18.1/.gitignore 0000664 0000000 0000000 00000004066 14636552303 0017146 0 ustar 00root root 0000000 0000000 # Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
sensor-state-data-2.18.1/.gitpod.yml 0000664 0000000 0000000 00000000306 14636552303 0017236 0 ustar 00root root 0000000 0000000 tasks:
- command: |
pip install poetry
PIP_USER=false poetry install
- command: |
pip install pre-commit
pre-commit install
PIP_USER=false pre-commit install-hooks
sensor-state-data-2.18.1/.idea/ 0000775 0000000 0000000 00000000000 14636552303 0016130 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/.idea/sensor-state-data.iml 0000664 0000000 0000000 00000000515 14636552303 0022172 0 ustar 00root root 0000000 0000000
sensor-state-data-2.18.1/.idea/watcherTasks.xml 0000664 0000000 0000000 00000005253 14636552303 0021322 0 ustar 00root root 0000000 0000000
sensor-state-data-2.18.1/.idea/workspace.xml 0000664 0000000 0000000 00000002735 14636552303 0020657 0 ustar 00root root 0000000 0000000
sensor-state-data-2.18.1/.pre-commit-config.yaml 0000664 0000000 0000000 00000003306 14636552303 0021433 0 ustar 00root root 0000000 0000000 # See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: "CHANGELOG.md"
default_stages: [commit]
ci:
autofix_commit_msg: "chore(pre-commit.ci): auto fixes"
autoupdate_commit_msg: "chore(pre-commit.ci): pre-commit autoupdate"
repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.28.0
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: debug-statements
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-toml
- id: check-xml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- id: debug-statements
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
args: ["--tab-width", "2"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.9
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
hooks:
- id: mypy
additional_dependencies: []
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args: [-x, tests]
sensor-state-data-2.18.1/.readthedocs.yml 0000664 0000000 0000000 00000001004 14636552303 0020231 0 ustar 00root root 0000000 0000000 # Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"
# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs
sensor-state-data-2.18.1/CHANGELOG.md 0000664 0000000 0000000 00000031713 14636552303 0016766 0 ustar 00root root 0000000 0000000 # Changelog
## v2.18.1 (2024-06-25)
### Fix
* Fix license classifier ([#61](https://github.com/Bluetooth-Devices/sensor-state-data/issues/61)) ([`135d7ff`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/135d7ff3e2cf0dece8cf430027d0c46a79104360))
## v2.18.0 (2023-10-20)
### Feature
* Allow name to be None ([#59](https://github.com/Bluetooth-Devices/sensor-state-data/issues/59)) ([`d321c31`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/d321c3196514a5a518340fe27e86b02b48bd87e3))
## v2.17.1 (2023-07-19)
### Fix
* Remove unwanted scale sensors ([#57](https://github.com/Bluetooth-Devices/sensor-state-data/issues/57)) ([`9ed2d0b`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/9ed2d0b586d4bcc93574d9de0cf5e0974509760e))
## v2.17.0 (2023-07-17)
### Feature
* Add sensors for scales ([#56](https://github.com/Bluetooth-Devices/sensor-state-data/issues/56)) ([`8c3160e`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/8c3160e89a7f49a0b96b010613784936c667d476))
## v2.16.1 (2023-07-06)
### Fix
* Ensure events are only kept for a single update cycle ([#53](https://github.com/Bluetooth-Devices/sensor-state-data/issues/53)) ([`304a844`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/304a844009204a524c0ad29821765e43288b44ca))
## v2.16.0 (2023-06-13)
### Feature
* Add sensor description for pressure in hPa ([#52](https://github.com/Bluetooth-Devices/sensor-state-data/issues/52)) ([`8e06dc8`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/8e06dc850830d7bc83a1295646788fb863edf8a8))
## v2.15.1 (2023-05-14)
### Fix
* Unit of gyroscope ([#49](https://github.com/Bluetooth-Devices/sensor-state-data/issues/49)) ([`6a61e9a`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/6a61e9a3d33b9a2acdd65cd7bb293cf31486b71f))
## v2.15.0 (2023-05-14)
### Feature
* Add acceleration gyroscope and timestamp sensors ([#48](https://github.com/Bluetooth-Devices/sensor-state-data/issues/48)) ([`e882f8b`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/e882f8bb8e0c9353d00d947e8774a5ae53c99687))
## v2.14.0 (2023-03-11)
### Feature
* Add water sensor ([#46](https://github.com/Bluetooth-Devices/sensor-state-data/issues/46)) ([`a90039e`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/a90039ec207a5aedf8455bd2afa4cedea7a311af))
## v2.13.0 (2022-12-17)
### Feature
* Add volume and packet_id sensor types ([#45](https://github.com/Bluetooth-Devices/sensor-state-data/issues/45)) ([`cda847e`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/cda847e2f94884b1018fa7eb1f3ce6feda0630c7))
## v2.12.1 (2022-11-13)
### Fix
* Wrong unit formaldehyde ([#44](https://github.com/Bluetooth-Devices/sensor-state-data/issues/44)) ([`0c8216f`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/0c8216f1ad9b7341a5c68669bd39fdd7500cf59f))
## v2.12.0 (2022-11-09)
### Feature
* Add conductivity and formaldehyde ([#43](https://github.com/Bluetooth-Devices/sensor-state-data/issues/43)) ([`53edc7a`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/53edc7a3b9508028d30e774eda3e65d16b89390b))
## v2.11.0 (2022-11-05)
### Feature
* Change time to duration and UV index ([#42](https://github.com/Bluetooth-Devices/sensor-state-data/issues/42)) ([`3e0a9f1`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/3e0a9f1f17aa68b9b6e122e197d223e12ce4dc22))
## v2.10.1 (2022-11-01)
### Fix
* Volt ampere should be ampere ([#41](https://github.com/Bluetooth-Devices/sensor-state-data/issues/41)) ([`703ba9d`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/703ba9d7def8d482df23619d29a66ea260db9813))
## v2.10.0 (2022-11-01)
### Feature
* New sensor types ([#40](https://github.com/Bluetooth-Devices/sensor-state-data/issues/40)) ([`6291208`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/6291208574409a9af48341cf6a43b5e2c5375ea7))
## v2.9.1 (2022-10-03)
### Fix
* Combine event data in str or dict ([#39](https://github.com/Bluetooth-Devices/sensor-state-data/issues/39)) ([`83e870f`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/83e870fc7127a7ac4032fdaa9b24727c1f3c8b08))
## v2.9.0 (2022-09-30)
### Feature
* Add support for events ([#38](https://github.com/Bluetooth-Devices/sensor-state-data/issues/38)) ([`bc15fe7`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/bc15fe7c2209f74430dd8211164152d21f36dc8e))
## v2.8.0 (2022-09-20)
### Feature
* Add kegtron sensor types ([#35](https://github.com/Bluetooth-Devices/sensor-state-data/issues/35)) ([`ee56f59`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/ee56f5945540ff11228b0e73f6994d0fbb776890))
## v2.7.0 (2022-09-06)
### Feature
* Add binary sensor device class ([#34](https://github.com/Bluetooth-Devices/sensor-state-data/issues/34)) ([`e34ca02`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/e34ca02fe3b37e95a1506759a5771cb43c96844f))
## v2.6.0 (2022-08-30)
### Feature
* Add specific gravity ([#33](https://github.com/Bluetooth-Devices/sensor-state-data/issues/33)) ([`9dacd26`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/9dacd26ed93ca545d17fd4d68b830dfc39f985f1))
## v2.5.0 (2022-08-28)
### Feature
* New device classes for new sensor types ([#31](https://github.com/Bluetooth-Devices/sensor-state-data/issues/31)) ([`35c47b2`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/35c47b2628d600e9fcabf35a38b8747abdd3181c))
## v2.4.0 (2022-08-28)
### Feature
* New sensor types ([#30](https://github.com/Bluetooth-Devices/sensor-state-data/issues/30)) ([`883235e`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/883235e2584d0e0cab66577c6a1acd863b3e9049))
## v2.3.2 (2022-08-24)
### Fix
* Unit of measurement voc ([#29](https://github.com/Bluetooth-Devices/sensor-state-data/issues/29)) ([`6e8a65e`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/6e8a65ecf08cb80c79a101892cf076de5974e283))
## v2.3.1 (2022-08-17)
### Fix
* Add pm units ([#28](https://github.com/Bluetooth-Devices/sensor-state-data/issues/28)) ([`3df28b5`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/3df28b5d5654632e91c78fc1fd7b09fc4ad1bfab))
## v2.3.0 (2022-08-17)
### Feature
* New base sensors ([#27](https://github.com/Bluetooth-Devices/sensor-state-data/issues/27)) ([`b7637bf`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/b7637bf725a12fdf0f358a52c94eda54b89303c6))
## v2.2.0 (2022-08-13)
### Feature
* Add set_precision convenience method ([#26](https://github.com/Bluetooth-Devices/sensor-state-data/issues/26)) ([`0937284`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/0937284a66bd9b2494817aa0402235cd1635d0f3))
## v2.1.2 (2022-08-11)
### Fix
* Export BinarySensorDescription ([#25](https://github.com/Bluetooth-Devices/sensor-state-data/issues/25)) ([`ecc7331`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/ecc73310db03f40b0e78d27a6ab0aa7f665f4f18))
## v2.1.1 (2022-08-11)
### Fix
* Add default factories for descriptions and values ([#24](https://github.com/Bluetooth-Devices/sensor-state-data/issues/24)) ([`519ac61`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/519ac61debf227ed36cd4855a3c77cc4c6db5432))
## v2.1.0 (2022-08-11)
### Feature
* Add support for binary sensors ([#23](https://github.com/Bluetooth-Devices/sensor-state-data/issues/23)) ([`902fb76`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/902fb7624d51627bd02e190f67d3234a17d4615a))
## v2.0.2 (2022-07-21)
### Fix
* Typing on native_unit_of_measurement ([#22](https://github.com/Bluetooth-Devices/sensor-state-data/issues/22)) ([`9815b3d`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/9815b3d679fb0f4416f4919c4246c45e7bed6806))
## v2.0.1 (2022-07-21)
### Fix
* Name and device type were not being set from refactor ([#21](https://github.com/Bluetooth-Devices/sensor-state-data/issues/21)) ([`2badc47`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/2badc471e96493437f7eea3bc8629894edd79217))
## v2.0.0 (2022-07-21)
### Feature
* Refactor to split name and units ([#20](https://github.com/Bluetooth-Devices/sensor-state-data/issues/20)) ([`e06c200`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/e06c20084ea106a2e9c6e506953c210bd90d0d10))
### Breaking
* Library has changed to have units ([`e06c200`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/e06c20084ea106a2e9c6e506953c210bd90d0d10))
* name is now moved to SensorValue ([`e06c200`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/e06c20084ea106a2e9c6e506953c210bd90d0d10))
* SensorDeviceInfo is now a dataclass ([`e06c200`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/e06c20084ea106a2e9c6e506953c210bd90d0d10))
* Units are now an str enum ([`e06c200`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/e06c20084ea106a2e9c6e506953c210bd90d0d10))
## v1.11.1 (2022-07-20)
### Fix
* Adjust naming to account for _s ([#19](https://github.com/Bluetooth-Devices/sensor-state-data/issues/19)) ([`ab600f5`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/ab600f51294510418b1502d72dfc84f88944c535))
* Do not prefix device name since hass will use entity_name ([#18](https://github.com/Bluetooth-Devices/sensor-state-data/issues/18)) ([`728be53`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/728be53bd3767b1f7c0a1f79ba37950cb7a13e2d))
## v1.11.0 (2022-07-19)
### Feature
* Rename _update_from_data to _start_update ([#17](https://github.com/Bluetooth-Devices/sensor-state-data/issues/17)) ([`3235362`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/3235362010113fd2a1903ede58fa39ce5854c38a))
## v1.10.0 (2022-07-19)
### Feature
* Export consts ([#16](https://github.com/Bluetooth-Devices/sensor-state-data/issues/16)) ([`177db6f`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/177db6f84519c2817bd891b8ad8ae2cb13414cd1))
## v1.9.0 (2022-07-19)
### Feature
* Allow setting the key for a predefined sensor ([#15](https://github.com/Bluetooth-Devices/sensor-state-data/issues/15)) ([`519b4e2`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/519b4e28d4d41f5ed24f326ae17507fc3321534a))
## v1.8.0 (2022-07-19)
### Feature
* Add the ability to set manufacturer/sw_version/hw_version ([#14](https://github.com/Bluetooth-Devices/sensor-state-data/issues/14)) ([`fef90fe`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/fef90fed29c1963ed00a75b9b6eaf78adcd34075))
## v1.7.0 (2022-07-19)
### Feature
* Add title property ([#13](https://github.com/Bluetooth-Devices/sensor-state-data/issues/13)) ([`7aa2690`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/7aa26901f77a8ad4109465c6232d8ae9ea99432c))
## v1.6.0 (2022-07-19)
### Feature
* Add primary_device_id property ([#12](https://github.com/Bluetooth-Devices/sensor-state-data/issues/12)) ([`6ee964b`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/6ee964b98b144a6f7c1e78444972e4759ee6223e))
## v1.5.1 (2022-07-19)
### Fix
* Fix __all__ ([#11](https://github.com/Bluetooth-Devices/sensor-state-data/issues/11)) ([`6f99e5f`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/6f99e5f6f3c3021ad320527e3024f5dbcb6186aa))
## v1.5.0 (2022-07-19)
### Feature
* Change model ([#10](https://github.com/Bluetooth-Devices/sensor-state-data/issues/10)) ([`a57ef64`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/a57ef64a255e6e40cdeea6332937a0f0891b1b3f))
## v1.4.1 (2022-07-19)
### Fix
* Sensor library should not be an enum ([#9](https://github.com/Bluetooth-Devices/sensor-state-data/issues/9)) ([`bed9997`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/bed9997e57f073e581c26329629ef0e05f8980c3))
## v1.4.0 (2022-07-19)
### Feature
* Update format ([#8](https://github.com/Bluetooth-Devices/sensor-state-data/issues/8)) ([`f8e4cdc`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/f8e4cdcacb415fd5c446e1ec263b19397c49b840))
## v1.3.1 (2022-07-18)
### Fix
* Refactor update_predefined_sensor ([#7](https://github.com/Bluetooth-Devices/sensor-state-data/issues/7)) ([`3e10e0e`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/3e10e0e20c274cb7f334ed8590d90d7fb10c622d))
## v1.3.0 (2022-07-18)
### Feature
* Add data ([#5](https://github.com/Bluetooth-Devices/sensor-state-data/issues/5)) ([`206f42d`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/206f42d5b14e80995e78ff5d658d3f0a3f0edc37))
### Fix
* Drop unused os ([#6](https://github.com/Bluetooth-Devices/sensor-state-data/issues/6)) ([`a5514fe`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/a5514fe2135659c026e8f629d96a2337bf49cfc1))
## v1.2.1 (2022-07-18)
### Fix
* Fix release process ([#4](https://github.com/Bluetooth-Devices/sensor-state-data/issues/4)) ([`fe660c3`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/fe660c3ea4a2b964f32e50801ddc4f4c8c85fdd4))
## v1.2.0 (2022-07-18)
### Feature
* Add library ([#3](https://github.com/Bluetooth-Devices/sensor-state-data/issues/3)) ([`c7d12fc`](https://github.com/Bluetooth-Devices/sensor-state-data/commit/c7d12fc63e9e253c3548951bd8c3c0dfc6620dde))
sensor-state-data-2.18.1/CONTRIBUTING.md 0000664 0000000 0000000 00000007447 14636552303 0017415 0 ustar 00root root 0000000 0000000 # Contributing
Contributions are welcome, and they are greatly appreciated! Every little helps, and credit will always be given.
You can contribute in many ways:
## Types of Contributions
### Report Bugs
Report bugs to [our issue page][gh-issues]. If you are reporting a bug, please include:
- Your operating system name and version.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.
### Fix Bugs
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.
### Implement Features
Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
### Write Documentation
Sensor State Data could always use more documentation, whether as part of the official Sensor State Data docs, in docstrings, or even on the web in blog posts, articles, and such.
### Submit Feedback
The best way to send feedback [our issue page][gh-issues] on GitHub. If you are proposing a feature:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that contributions are welcome 😊
## Get Started!
Ready to contribute? Here's how to set yourself up for local development.
1. Fork the repo on GitHub.
2. Clone your fork locally:
```shell
$ git clone git@github.com:your_name_here/sensor-state-data.git
```
3. Install the project dependencies with [Poetry](https://python-poetry.org):
```shell
$ poetry install
```
4. Create a branch for local development:
```shell
$ git checkout -b name-of-your-bugfix-or-feature
```
Now you can make your changes locally.
5. When you're done making changes, check that your changes pass our tests:
```shell
$ poetry run pytest
```
6. Linting is done through [pre-commit](https://pre-commit.com). Provided you have the tool installed globally, you can run them all as one-off:
```shell
$ pre-commit run -a
```
Or better, install the hooks once and have them run automatically each time you commit:
```shell
$ pre-commit install
```
7. Commit your changes and push your branch to GitHub:
```shell
$ git add .
$ git commit -m "feat(something): your detailed description of your changes"
$ git push origin name-of-your-bugfix-or-feature
```
Note: the commit message should follow [the conventional commits](https://www.conventionalcommits.org). We run [`commitlint` on CI](https://github.com/marketplace/actions/commit-linter) to validate it, and if you've installed pre-commit hooks at the previous step, the message will be checked at commit time.
8. Submit a pull request through the GitHub website or using the GitHub CLI (if you have it installed):
```shell
$ gh pr create --fill
```
## Pull Request Guidelines
We like to have the pull request open as soon as possible, that's a great place to discuss any piece of work, even unfinished. You can use draft pull request if it's still a work in progress. Here are a few guidelines to follow:
1. Include tests for feature or bug fixes.
2. Update the documentation for significant features.
3. Ensure tests are passing on CI.
## Tips
To run a subset of tests:
```shell
$ pytest tests
```
## Making a new release
The deployment should be automated and can be triggered from the Semantic Release workflow in GitHub. The next version will be based on [the commit logs](https://python-semantic-release.readthedocs.io/en/latest/commit-log-parsing.html#commit-log-parsing). This is done by [python-semantic-release](https://python-semantic-release.readthedocs.io/en/latest/index.html) via a GitHub action.
[gh-issues]: https://github.com/bdraco/sensor-state-data/issues
sensor-state-data-2.18.1/LICENSE 0000664 0000000 0000000 00000026121 14636552303 0016157 0 ustar 00root root 0000000 0000000
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2022 J. Nick Koston
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
sensor-state-data-2.18.1/README.md 0000664 0000000 0000000 00000007032 14636552303 0016431 0 ustar 00root root 0000000 0000000 # Sensor State Data
Models for storing and converting Sensor Data state
## Installation
Install this via pip (or your favourite package manager):
`pip install sensor-state-data`
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
## Credits
This package was created with
[Cookiecutter](https://github.com/audreyr/cookiecutter) and the
[browniebroke/cookiecutter-pypackage](https://github.com/browniebroke/cookiecutter-pypackage)
project template.
sensor-state-data-2.18.1/commitlint.config.js 0000664 0000000 0000000 00000000364 14636552303 0021134 0 ustar 00root root 0000000 0000000 module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"header-max-length": [0, "always", Infinity],
"body-max-line-length": [0, "always", Infinity],
"footer-max-line-length": [0, "always", Infinity],
},
};
sensor-state-data-2.18.1/docs/ 0000775 0000000 0000000 00000000000 14636552303 0016100 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/docs/Makefile 0000664 0000000 0000000 00000001175 14636552303 0017544 0 ustar 00root root 0000000 0000000 # Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
sensor-state-data-2.18.1/docs/make.bat 0000664 0000000 0000000 00000001374 14636552303 0017512 0 ustar 00root root 0000000 0000000 @ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
sensor-state-data-2.18.1/docs/source/ 0000775 0000000 0000000 00000000000 14636552303 0017400 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/docs/source/_static/ 0000775 0000000 0000000 00000000000 14636552303 0021026 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/docs/source/_static/.gitkeep 0000664 0000000 0000000 00000000000 14636552303 0022445 0 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/docs/source/changelog.md 0000664 0000000 0000000 00000000045 14636552303 0021650 0 ustar 00root root 0000000 0000000 ```{include} ../../CHANGELOG.md
```
sensor-state-data-2.18.1/docs/source/conf.py 0000664 0000000 0000000 00000003661 14636552303 0020705 0 ustar 00root root 0000000 0000000 # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
from typing import Any, List
# -- Project information -----------------------------------------------------
project = "Sensor State Data"
copyright = "2020, J. Nick Koston"
author = "J. Nick Koston"
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"myst_parser",
]
# The suffix of source filenames.
source_suffix = [".rst", ".md"]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns: List[Any] = []
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
sensor-state-data-2.18.1/docs/source/contributing.md 0000664 0000000 0000000 00000000050 14636552303 0022424 0 ustar 00root root 0000000 0000000 ```{include} ../../CONTRIBUTING.md
```
sensor-state-data-2.18.1/docs/source/index.md 0000664 0000000 0000000 00000000361 14636552303 0021031 0 ustar 00root root 0000000 0000000 # Welcome to Sensor State Data documentation!
```{toctree}
:caption: Installation & Usage
:maxdepth: 2
installation
usage
```
```{toctree}
:caption: Project Info
:maxdepth: 2
changelog
contributing
```
```{include} ../../README.md
```
sensor-state-data-2.18.1/docs/source/installation.md 0000664 0000000 0000000 00000000274 14636552303 0022426 0 ustar 00root root 0000000 0000000 # Installation
The package is published on [PyPI](https://pypi.org/project/deezer-python/) and can be installed with `pip` (or any equivalent):
```bash
pip install sensor-state-data
```
sensor-state-data-2.18.1/docs/source/usage.md 0000664 0000000 0000000 00000000147 14636552303 0021030 0 ustar 00root root 0000000 0000000 # Usage
To use this package, import it:
```python
import sensor_state_data
```
TODO: Document usage
sensor-state-data-2.18.1/poetry.lock 0000664 0000000 0000000 00000126155 14636552303 0017356 0 ustar 00root root 0000000 0000000 [[package]]
name = "alabaster"
version = "0.7.12"
description = "A configurable sidebar-enabled Sphinx theme"
category = "main"
optional = true
python-versions = "*"
[[package]]
name = "atomicwrites"
version = "1.4.1"
description = "Atomic file writes."
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
name = "attrs"
version = "21.4.0"
description = "Classes Without Boilerplate"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[package.extras]
dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "sphinx", "sphinx-notfound-page", "zope.interface"]
docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "zope.interface"]
tests_no_zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six"]
[[package]]
name = "babel"
version = "2.10.3"
description = "Internationalization utilities"
category = "main"
optional = true
python-versions = ">=3.6"
[package.dependencies]
pytz = ">=2015.7"
[[package]]
name = "certifi"
version = "2022.6.15"
description = "Python package for providing Mozilla's CA Bundle."
category = "main"
optional = true
python-versions = ">=3.6"
[[package]]
name = "charset-normalizer"
version = "2.1.0"
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
category = "main"
optional = true
python-versions = ">=3.6.0"
[package.extras]
unicode_backport = ["unicodedata2"]
[[package]]
name = "colorama"
version = "0.4.5"
description = "Cross-platform colored terminal text."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "coverage"
version = "7.2.5"
description = "Code coverage measurement for Python"
category = "dev"
optional = false
python-versions = ">=3.7"
[package.dependencies]
tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}
[package.extras]
toml = ["tomli"]
[[package]]
name = "docutils"
version = "0.17.1"
description = "Docutils -- Python Documentation Utilities"
category = "main"
optional = true
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "idna"
version = "3.3"
description = "Internationalized Domain Names in Applications (IDNA)"
category = "main"
optional = true
python-versions = ">=3.5"
[[package]]
name = "imagesize"
version = "1.4.1"
description = "Getting image size from png/jpeg/jpeg2000/gif file"
category = "main"
optional = true
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
name = "importlib-metadata"
version = "4.12.0"
description = "Read metadata from Python packages"
category = "main"
optional = true
python-versions = ">=3.7"
[package.dependencies]
zipp = ">=0.5"
[package.extras]
docs = ["jaraco.packaging (>=9)", "rst.linker (>=1.9)", "sphinx"]
perf = ["ipython"]
testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"]
[[package]]
name = "iniconfig"
version = "1.1.1"
description = "iniconfig: brain-dead simple config-ini parsing"
category = "dev"
optional = false
python-versions = "*"
[[package]]
name = "jinja2"
version = "3.1.2"
description = "A very fast and expressive template engine."
category = "main"
optional = true
python-versions = ">=3.7"
[package.dependencies]
MarkupSafe = ">=2.0"
[package.extras]
i18n = ["Babel (>=2.7)"]
[[package]]
name = "markdown-it-py"
version = "2.1.0"
description = "Python port of markdown-it. Markdown parsing, done right!"
category = "main"
optional = true
python-versions = ">=3.7"
[package.dependencies]
mdurl = ">=0.1,<1.0"
[package.extras]
benchmarking = ["psutil", "pytest", "pytest-benchmark (>=3.2,<4.0)"]
code_style = ["pre-commit (==2.6)"]
compare = ["commonmark (>=0.9.1,<0.10.0)", "markdown (>=3.3.6,<3.4.0)", "mistletoe (>=0.8.1,<0.9.0)", "mistune (>=2.0.2,<2.1.0)", "panflute (>=2.1.3,<2.2.0)"]
linkify = ["linkify-it-py (>=1.0,<2.0)"]
plugins = ["mdit-py-plugins"]
profiling = ["gprof2dot"]
rtd = ["attrs", "myst-parser", "pyyaml", "sphinx", "sphinx-book-theme", "sphinx-copybutton", "sphinx-design"]
testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"]
[[package]]
name = "markupsafe"
version = "2.1.1"
description = "Safely add untrusted strings to HTML/XML markup."
category = "main"
optional = true
python-versions = ">=3.7"
[[package]]
name = "mdit-py-plugins"
version = "0.3.0"
description = "Collection of plugins for markdown-it-py"
category = "main"
optional = true
python-versions = "~=3.6"
[package.dependencies]
markdown-it-py = ">=1.0.0,<3.0.0"
[package.extras]
code_style = ["pre-commit (==2.6)"]
rtd = ["myst-parser (>=0.14.0,<0.15.0)", "sphinx-book-theme (>=0.1.0,<0.2.0)"]
testing = ["coverage", "pytest (>=3.6,<4)", "pytest-cov", "pytest-regressions"]
[[package]]
name = "mdurl"
version = "0.1.1"
description = "Markdown URL utilities"
category = "main"
optional = true
python-versions = ">=3.7"
[[package]]
name = "myst-parser"
version = "0.18.0"
description = "An extended commonmark compliant parser, with bridges to docutils & sphinx."
category = "main"
optional = true
python-versions = ">=3.7"
[package.dependencies]
docutils = ">=0.15,<0.19"
jinja2 = "*"
markdown-it-py = ">=1.0.0,<3.0.0"
mdit-py-plugins = ">=0.3.0,<0.4.0"
pyyaml = "*"
sphinx = ">=4,<6"
typing-extensions = "*"
[package.extras]
code_style = ["pre-commit (>=2.12,<3.0)"]
linkify = ["linkify-it-py (>=1.0,<2.0)"]
rtd = ["ipython", "sphinx-book-theme", "sphinx-design", "sphinxcontrib.mermaid (>=0.7.1,<0.8.0)", "sphinxext-opengraph (>=0.6.3,<0.7.0)", "sphinxext-rediraffe (>=0.2.7,<0.3.0)"]
testing = ["beautifulsoup4", "coverage", "pytest (>=6,<7)", "pytest-cov", "pytest-param-files (>=0.3.4,<0.4.0)", "pytest-regressions", "sphinx-pytest"]
[[package]]
name = "packaging"
version = "21.3"
description = "Core utilities for Python packages"
category = "main"
optional = false
python-versions = ">=3.6"
[package.dependencies]
pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
[[package]]
name = "pluggy"
version = "1.0.0"
description = "plugin and hook calling mechanisms for python"
category = "dev"
optional = false
python-versions = ">=3.6"
[package.extras]
dev = ["pre-commit", "tox"]
testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "py"
version = "1.11.0"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "pygments"
version = "2.12.0"
description = "Pygments is a syntax highlighting package written in Python."
category = "main"
optional = true
python-versions = ">=3.6"
[[package]]
name = "pyparsing"
version = "3.0.9"
description = "pyparsing module - Classes and methods to define and execute parsing grammars"
category = "main"
optional = false
python-versions = ">=3.6.8"
[package.extras]
diagrams = ["jinja2", "railroad-diagrams"]
[[package]]
name = "pytest"
version = "7.1.2"
description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false
python-versions = ">=3.7"
[package.dependencies]
atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""}
attrs = ">=19.2.0"
colorama = {version = "*", markers = "sys_platform == \"win32\""}
iniconfig = "*"
packaging = "*"
pluggy = ">=0.12,<2.0"
py = ">=1.8.2"
tomli = ">=1.0.0"
[package.extras]
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
[[package]]
name = "pytest-cov"
version = "3.0.0"
description = "Pytest plugin for measuring coverage."
category = "dev"
optional = false
python-versions = ">=3.6"
[package.dependencies]
coverage = {version = ">=5.2.1", extras = ["toml"]}
pytest = ">=4.6"
[package.extras]
testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"]
[[package]]
name = "pytz"
version = "2022.1"
description = "World timezone definitions, modern and historical"
category = "main"
optional = true
python-versions = "*"
[[package]]
name = "pyyaml"
version = "6.0"
description = "YAML parser and emitter for Python"
category = "main"
optional = true
python-versions = ">=3.6"
[[package]]
name = "requests"
version = "2.28.1"
description = "Python HTTP for Humans."
category = "main"
optional = true
python-versions = ">=3.7, <4"
[package.dependencies]
certifi = ">=2017.4.17"
charset-normalizer = ">=2,<3"
idna = ">=2.5,<4"
urllib3 = ">=1.21.1,<1.27"
[package.extras]
socks = ["PySocks (>=1.5.6,!=1.5.7)"]
use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"]
[[package]]
name = "snowballstemmer"
version = "2.2.0"
description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms."
category = "main"
optional = true
python-versions = "*"
[[package]]
name = "sphinx"
version = "5.0.2"
description = "Python documentation generator"
category = "main"
optional = true
python-versions = ">=3.6"
[package.dependencies]
alabaster = ">=0.7,<0.8"
babel = ">=1.3"
colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""}
docutils = ">=0.14,<0.19"
imagesize = "*"
importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""}
Jinja2 = ">=2.3"
packaging = "*"
Pygments = ">=2.0"
requests = ">=2.5.0"
snowballstemmer = ">=1.1"
sphinxcontrib-applehelp = "*"
sphinxcontrib-devhelp = "*"
sphinxcontrib-htmlhelp = ">=2.0.0"
sphinxcontrib-jsmath = "*"
sphinxcontrib-qthelp = "*"
sphinxcontrib-serializinghtml = ">=1.1.5"
[package.extras]
docs = ["sphinxcontrib-websupport"]
lint = ["docutils-stubs", "flake8 (>=3.5.0)", "isort", "mypy (>=0.950)", "types-requests", "types-typed-ast"]
test = ["cython", "html5lib", "pytest (>=4.6)", "typed-ast"]
[[package]]
name = "sphinx-rtd-theme"
version = "1.0.0"
description = "Read the Docs theme for Sphinx"
category = "main"
optional = true
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*"
[package.dependencies]
docutils = "<0.18"
sphinx = ">=1.6"
[package.extras]
dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client"]
[[package]]
name = "sphinxcontrib-applehelp"
version = "1.0.2"
description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books"
category = "main"
optional = true
python-versions = ">=3.5"
[package.extras]
lint = ["docutils-stubs", "flake8", "mypy"]
test = ["pytest"]
[[package]]
name = "sphinxcontrib-devhelp"
version = "1.0.2"
description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document."
category = "main"
optional = true
python-versions = ">=3.5"
[package.extras]
lint = ["docutils-stubs", "flake8", "mypy"]
test = ["pytest"]
[[package]]
name = "sphinxcontrib-htmlhelp"
version = "2.0.0"
description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files"
category = "main"
optional = true
python-versions = ">=3.6"
[package.extras]
lint = ["docutils-stubs", "flake8", "mypy"]
test = ["html5lib", "pytest"]
[[package]]
name = "sphinxcontrib-jsmath"
version = "1.0.1"
description = "A sphinx extension which renders display math in HTML via JavaScript"
category = "main"
optional = true
python-versions = ">=3.5"
[package.extras]
test = ["flake8", "mypy", "pytest"]
[[package]]
name = "sphinxcontrib-qthelp"
version = "1.0.3"
description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document."
category = "main"
optional = true
python-versions = ">=3.5"
[package.extras]
lint = ["docutils-stubs", "flake8", "mypy"]
test = ["pytest"]
[[package]]
name = "sphinxcontrib-serializinghtml"
version = "1.1.5"
description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)."
category = "main"
optional = true
python-versions = ">=3.5"
[package.extras]
lint = ["docutils-stubs", "flake8", "mypy"]
test = ["pytest"]
[[package]]
name = "tomli"
version = "2.0.1"
description = "A lil' TOML parser"
category = "dev"
optional = false
python-versions = ">=3.7"
[[package]]
name = "typing-extensions"
version = "4.3.0"
description = "Backported and Experimental Type Hints for Python 3.7+"
category = "main"
optional = true
python-versions = ">=3.7"
[[package]]
name = "urllib3"
version = "1.26.10"
description = "HTTP library with thread-safe connection pooling, file post, and more."
category = "main"
optional = true
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4"
[package.extras]
brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"]
secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)"]
socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
[[package]]
name = "zipp"
version = "3.8.1"
description = "Backport of pathlib-compatible object wrapper for zip files"
category = "main"
optional = true
python-versions = ">=3.7"
[package.extras]
docs = ["jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx"]
testing = ["func-timeout", "jaraco.itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
[extras]
docs = ["myst-parser", "Sphinx", "sphinx-rtd-theme"]
[metadata]
lock-version = "1.1"
python-versions = "^3.9"
content-hash = "19af94a23e5f465c7a0f36fdd810998890369680c7211014edbb47182815bed7"
[metadata.files]
alabaster = [
{file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"},
{file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"},
]
atomicwrites = [
{file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"},
]
attrs = [
{file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"},
{file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"},
]
babel = [
{file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"},
{file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"},
]
certifi = [
{file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"},
{file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"},
]
charset-normalizer = [
{file = "charset-normalizer-2.1.0.tar.gz", hash = "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"},
{file = "charset_normalizer-2.1.0-py3-none-any.whl", hash = "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5"},
]
colorama = [
{file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"},
{file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"},
]
coverage = [
{file = "coverage-7.2.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:883123d0bbe1c136f76b56276074b0c79b5817dd4238097ffa64ac67257f4b6c"},
{file = "coverage-7.2.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d2fbc2a127e857d2f8898aaabcc34c37771bf78a4d5e17d3e1f5c30cd0cbc62a"},
{file = "coverage-7.2.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f3671662dc4b422b15776cdca89c041a6349b4864a43aa2350b6b0b03bbcc7f"},
{file = "coverage-7.2.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780551e47d62095e088f251f5db428473c26db7829884323e56d9c0c3118791a"},
{file = "coverage-7.2.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:066b44897c493e0dcbc9e6a6d9f8bbb6607ef82367cf6810d387c09f0cd4fe9a"},
{file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b9a4ee55174b04f6af539218f9f8083140f61a46eabcaa4234f3c2a452c4ed11"},
{file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:706ec567267c96717ab9363904d846ec009a48d5f832140b6ad08aad3791b1f5"},
{file = "coverage-7.2.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ae453f655640157d76209f42c62c64c4d4f2c7f97256d3567e3b439bd5c9b06c"},
{file = "coverage-7.2.5-cp310-cp310-win32.whl", hash = "sha256:f81c9b4bd8aa747d417407a7f6f0b1469a43b36a85748145e144ac4e8d303cb5"},
{file = "coverage-7.2.5-cp310-cp310-win_amd64.whl", hash = "sha256:dc945064a8783b86fcce9a0a705abd7db2117d95e340df8a4333f00be5efb64c"},
{file = "coverage-7.2.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:40cc0f91c6cde033da493227797be2826cbf8f388eaa36a0271a97a332bfd7ce"},
{file = "coverage-7.2.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a66e055254a26c82aead7ff420d9fa8dc2da10c82679ea850d8feebf11074d88"},
{file = "coverage-7.2.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c10fbc8a64aa0f3ed136b0b086b6b577bc64d67d5581acd7cc129af52654384e"},
{file = "coverage-7.2.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9a22cbb5ede6fade0482111fa7f01115ff04039795d7092ed0db43522431b4f2"},
{file = "coverage-7.2.5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:292300f76440651529b8ceec283a9370532f4ecba9ad67d120617021bb5ef139"},
{file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7ff8f3fb38233035028dbc93715551d81eadc110199e14bbbfa01c5c4a43f8d8"},
{file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:a08c7401d0b24e8c2982f4e307124b671c6736d40d1c39e09d7a8687bddf83ed"},
{file = "coverage-7.2.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ef9659d1cda9ce9ac9585c045aaa1e59223b143f2407db0eaee0b61a4f266fb6"},
{file = "coverage-7.2.5-cp311-cp311-win32.whl", hash = "sha256:30dcaf05adfa69c2a7b9f7dfd9f60bc8e36b282d7ed25c308ef9e114de7fc23b"},
{file = "coverage-7.2.5-cp311-cp311-win_amd64.whl", hash = "sha256:97072cc90f1009386c8a5b7de9d4fc1a9f91ba5ef2146c55c1f005e7b5c5e068"},
{file = "coverage-7.2.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bebea5f5ed41f618797ce3ffb4606c64a5de92e9c3f26d26c2e0aae292f015c1"},
{file = "coverage-7.2.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:828189fcdda99aae0d6bf718ea766b2e715eabc1868670a0a07bf8404bf58c33"},
{file = "coverage-7.2.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e8a95f243d01ba572341c52f89f3acb98a3b6d1d5d830efba86033dd3687ade"},
{file = "coverage-7.2.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8834e5f17d89e05697c3c043d3e58a8b19682bf365048837383abfe39adaed5"},
{file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d1f25ee9de21a39b3a8516f2c5feb8de248f17da7eead089c2e04aa097936b47"},
{file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1637253b11a18f453e34013c665d8bf15904c9e3c44fbda34c643fbdc9d452cd"},
{file = "coverage-7.2.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8e575a59315a91ccd00c7757127f6b2488c2f914096077c745c2f1ba5b8c0969"},
{file = "coverage-7.2.5-cp37-cp37m-win32.whl", hash = "sha256:509ecd8334c380000d259dc66feb191dd0a93b21f2453faa75f7f9cdcefc0718"},
{file = "coverage-7.2.5-cp37-cp37m-win_amd64.whl", hash = "sha256:12580845917b1e59f8a1c2ffa6af6d0908cb39220f3019e36c110c943dc875b0"},
{file = "coverage-7.2.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b5016e331b75310610c2cf955d9f58a9749943ed5f7b8cfc0bb89c6134ab0a84"},
{file = "coverage-7.2.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:373ea34dca98f2fdb3e5cb33d83b6d801007a8074f992b80311fc589d3e6b790"},
{file = "coverage-7.2.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a063aad9f7b4c9f9da7b2550eae0a582ffc7623dca1c925e50c3fbde7a579771"},
{file = "coverage-7.2.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38c0a497a000d50491055805313ed83ddba069353d102ece8aef5d11b5faf045"},
{file = "coverage-7.2.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2b3b05e22a77bb0ae1a3125126a4e08535961c946b62f30985535ed40e26614"},
{file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0342a28617e63ad15d96dca0f7ae9479a37b7d8a295f749c14f3436ea59fdcb3"},
{file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:cf97ed82ca986e5c637ea286ba2793c85325b30f869bf64d3009ccc1a31ae3fd"},
{file = "coverage-7.2.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c2c41c1b1866b670573657d584de413df701f482574bad7e28214a2362cb1fd1"},
{file = "coverage-7.2.5-cp38-cp38-win32.whl", hash = "sha256:10b15394c13544fce02382360cab54e51a9e0fd1bd61ae9ce012c0d1e103c813"},
{file = "coverage-7.2.5-cp38-cp38-win_amd64.whl", hash = "sha256:a0b273fe6dc655b110e8dc89b8ec7f1a778d78c9fd9b4bda7c384c8906072212"},
{file = "coverage-7.2.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c587f52c81211d4530fa6857884d37f514bcf9453bdeee0ff93eaaf906a5c1b"},
{file = "coverage-7.2.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4436cc9ba5414c2c998eaedee5343f49c02ca93b21769c5fdfa4f9d799e84200"},
{file = "coverage-7.2.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6599bf92f33ab041e36e06d25890afbdf12078aacfe1f1d08c713906e49a3fe5"},
{file = "coverage-7.2.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:857abe2fa6a4973f8663e039ead8d22215d31db613ace76e4a98f52ec919068e"},
{file = "coverage-7.2.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6f5cab2d7f0c12f8187a376cc6582c477d2df91d63f75341307fcdcb5d60303"},
{file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:aa387bd7489f3e1787ff82068b295bcaafbf6f79c3dad3cbc82ef88ce3f48ad3"},
{file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:156192e5fd3dbbcb11cd777cc469cf010a294f4c736a2b2c891c77618cb1379a"},
{file = "coverage-7.2.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bd3b4b8175c1db502adf209d06136c000df4d245105c8839e9d0be71c94aefe1"},
{file = "coverage-7.2.5-cp39-cp39-win32.whl", hash = "sha256:ddc5a54edb653e9e215f75de377354e2455376f416c4378e1d43b08ec50acc31"},
{file = "coverage-7.2.5-cp39-cp39-win_amd64.whl", hash = "sha256:338aa9d9883aaaad53695cb14ccdeb36d4060485bb9388446330bef9c361c252"},
{file = "coverage-7.2.5-pp37.pp38.pp39-none-any.whl", hash = "sha256:8877d9b437b35a85c18e3c6499b23674684bf690f5d96c1006a1ef61f9fdf0f3"},
{file = "coverage-7.2.5.tar.gz", hash = "sha256:f99ef080288f09ffc687423b8d60978cf3a465d3f404a18d1a05474bd8575a47"},
]
docutils = [
{file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"},
{file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"},
]
idna = [
{file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"},
{file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"},
]
imagesize = [
{file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"},
{file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"},
]
importlib-metadata = [
{file = "importlib_metadata-4.12.0-py3-none-any.whl", hash = "sha256:7401a975809ea1fdc658c3aa4f78cc2195a0e019c5cbc4c06122884e9ae80c23"},
{file = "importlib_metadata-4.12.0.tar.gz", hash = "sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670"},
]
iniconfig = [
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
{file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
]
jinja2 = [
{file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"},
{file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"},
]
markdown-it-py = [
{file = "markdown-it-py-2.1.0.tar.gz", hash = "sha256:cf7e59fed14b5ae17c0006eff14a2d9a00ed5f3a846148153899a0224e2c07da"},
{file = "markdown_it_py-2.1.0-py3-none-any.whl", hash = "sha256:93de681e5c021a432c63147656fe21790bc01231e0cd2da73626f1aa3ac0fe27"},
]
markupsafe = [
{file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"},
{file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"},
{file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"},
{file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"},
{file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"},
{file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"},
{file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"},
{file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"},
{file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"},
{file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"},
{file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"},
{file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"},
{file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"},
{file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"},
{file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"},
{file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"},
{file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"},
{file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"},
{file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"},
{file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"},
{file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"},
{file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"},
{file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"},
{file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"},
{file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"},
{file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"},
{file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"},
{file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"},
{file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"},
{file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"},
{file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"},
{file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"},
{file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"},
{file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"},
{file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"},
{file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"},
{file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"},
{file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"},
{file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"},
{file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"},
]
mdit-py-plugins = [
{file = "mdit-py-plugins-0.3.0.tar.gz", hash = "sha256:ecc24f51eeec6ab7eecc2f9724e8272c2fb191c2e93cf98109120c2cace69750"},
{file = "mdit_py_plugins-0.3.0-py3-none-any.whl", hash = "sha256:b1279701cee2dbf50e188d3da5f51fee8d78d038cdf99be57c6b9d1aa93b4073"},
]
mdurl = [
{file = "mdurl-0.1.1-py3-none-any.whl", hash = "sha256:6a8f6804087b7128040b2fb2ebe242bdc2affaeaa034d5fc9feeed30b443651b"},
{file = "mdurl-0.1.1.tar.gz", hash = "sha256:f79c9709944df218a4cdb0fcc0b0c7ead2f44594e3e84dc566606f04ad749c20"},
]
myst-parser = [
{file = "myst-parser-0.18.0.tar.gz", hash = "sha256:739a4d96773a8e55a2cacd3941ce46a446ee23dcd6b37e06f73f551ad7821d86"},
{file = "myst_parser-0.18.0-py3-none-any.whl", hash = "sha256:4965e51918837c13bf1c6f6fe2c6bddddf193148360fbdaefe743a4981358f6a"},
]
packaging = [
{file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"},
{file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"},
]
pluggy = [
{file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
{file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
]
py = [
{file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"},
{file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"},
]
pygments = [
{file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"},
{file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"},
]
pyparsing = [
{file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"},
{file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"},
]
pytest = [
{file = "pytest-7.1.2-py3-none-any.whl", hash = "sha256:13d0e3ccfc2b6e26be000cb6568c832ba67ba32e719443bfe725814d3c42433c"},
{file = "pytest-7.1.2.tar.gz", hash = "sha256:a06a0425453864a270bc45e71f783330a7428defb4230fb5e6a731fde06ecd45"},
]
pytest-cov = [
{file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"},
{file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"},
]
pytz = [
{file = "pytz-2022.1-py2.py3-none-any.whl", hash = "sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c"},
{file = "pytz-2022.1.tar.gz", hash = "sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7"},
]
pyyaml = [
{file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"},
{file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"},
{file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"},
{file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"},
{file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"},
{file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"},
{file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"},
{file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"},
{file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"},
{file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"},
{file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"},
{file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"},
{file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"},
{file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"},
{file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"},
{file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"},
{file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"},
{file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"},
{file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"},
{file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"},
{file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"},
{file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"},
{file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"},
{file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"},
{file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"},
{file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"},
{file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"},
{file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"},
{file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"},
{file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"},
{file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"},
{file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"},
{file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"},
]
requests = [
{file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"},
{file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"},
]
snowballstemmer = [
{file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"},
{file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"},
]
sphinx = [
{file = "Sphinx-5.0.2-py3-none-any.whl", hash = "sha256:d3e57663eed1d7c5c50895d191fdeda0b54ded6f44d5621b50709466c338d1e8"},
{file = "Sphinx-5.0.2.tar.gz", hash = "sha256:b18e978ea7565720f26019c702cd85c84376e948370f1cd43d60265010e1c7b0"},
]
sphinx-rtd-theme = [
{file = "sphinx_rtd_theme-1.0.0-py2.py3-none-any.whl", hash = "sha256:4d35a56f4508cfee4c4fb604373ede6feae2a306731d533f409ef5c3496fdbd8"},
{file = "sphinx_rtd_theme-1.0.0.tar.gz", hash = "sha256:eec6d497e4c2195fa0e8b2016b337532b8a699a68bcb22a512870e16925c6a5c"},
]
sphinxcontrib-applehelp = [
{file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"},
{file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"},
]
sphinxcontrib-devhelp = [
{file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"},
{file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"},
]
sphinxcontrib-htmlhelp = [
{file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"},
{file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"},
]
sphinxcontrib-jsmath = [
{file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"},
{file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"},
]
sphinxcontrib-qthelp = [
{file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"},
{file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"},
]
sphinxcontrib-serializinghtml = [
{file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"},
{file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"},
]
tomli = [
{file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
{file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
]
typing-extensions = [
{file = "typing_extensions-4.3.0-py3-none-any.whl", hash = "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"},
{file = "typing_extensions-4.3.0.tar.gz", hash = "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6"},
]
urllib3 = [
{file = "urllib3-1.26.10-py2.py3-none-any.whl", hash = "sha256:8298d6d56d39be0e3bc13c1c97d133f9b45d797169a0e11cdd0e0489d786f7ec"},
{file = "urllib3-1.26.10.tar.gz", hash = "sha256:879ba4d1e89654d9769ce13121e0f94310ea32e8d2f8cf587b77c08bbcdb30d6"},
]
zipp = [
{file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"},
{file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"},
]
sensor-state-data-2.18.1/pyproject.toml 0000664 0000000 0000000 00000004457 14636552303 0020076 0 ustar 00root root 0000000 0000000 [tool.poetry]
name = "sensor-state-data"
version = "2.18.1"
description = "Models for storing and converting Sensor Data state"
authors = ["J. Nick Koston "]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/bluetooth-devices/sensor-state-data"
documentation = "https://sensor-state-data.readthedocs.io"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries",
]
packages = [
{ include = "sensor_state_data", from = "src" },
]
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/bluetooth-devices/sensor-state-data/issues"
"Changelog" = "https://github.com/bluetooth-devices/sensor-state-data/blob/main/CHANGELOG.md"
[tool.poetry.dependencies]
python = "^3.9"
# Documentation Dependencies
Sphinx = {version = "^5.0", optional = true}
sphinx-rtd-theme = {version = "^1.0", optional = true}
myst-parser = {version = "^0.18", optional = true}
[tool.poetry.extras]
docs = [
"myst-parser",
"sphinx",
"sphinx-rtd-theme",
]
[tool.poetry.dev-dependencies]
pytest = "^7.0"
pytest-cov = "^3.0"
[tool.semantic_release]
branch = "main"
version_toml = "pyproject.toml:tool.poetry.version"
version_variable = "src/sensor_state_data/__init__.py:__version__"
build_command = "pip install poetry && poetry build"
[tool.pytest.ini_options]
addopts = "-v -Wdefault --cov=sensor_state_data --cov-report=term-missing:skip-covered"
pythonpath = ["src"]
[tool.coverage.run]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"@overload",
"if TYPE_CHECKING",
"raise NotImplementedError",
]
[tool.isort]
profile = "black"
known_first_party = ["sensor_state_data", "tests"]
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
mypy_path = "src/"
no_implicit_optional = true
show_error_codes = true
warn_unreachable = true
warn_unused_ignores = true
exclude = [
'docs/.*',
'setup.py',
]
[[tool.mypy.overrides]]
module = "tests.*"
allow_untyped_defs = true
[[tool.mypy.overrides]]
module = "docs.*"
ignore_errors = true
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
sensor-state-data-2.18.1/renovate.json 0000664 0000000 0000000 00000000101 14636552303 0017656 0 ustar 00root root 0000000 0000000 {
"extends": ["github>browniebroke/renovate-configs:python"]
}
sensor-state-data-2.18.1/setup.py 0000664 0000000 0000000 00000000367 14636552303 0016670 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# This is a shim to allow GitHub to detect the package, build is done with poetry
# Taken from https://github.com/Textualize/rich
import setuptools
if __name__ == "__main__":
setuptools.setup(name="sensor-state-data")
sensor-state-data-2.18.1/src/ 0000775 0000000 0000000 00000000000 14636552303 0015737 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/src/sensor_state_data/ 0000775 0000000 0000000 00000000000 14636552303 0021441 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/src/sensor_state_data/__init__.py 0000664 0000000 0000000 00000001526 14636552303 0023556 0 ustar 00root root 0000000 0000000 __version__ = "2.18.1"
from .base import BaseDeviceClass
from .binary_sensor.device_class import BinarySensorDeviceClass
from .data import SensorData, SensorDeviceInfo, SensorUpdate
from .description import BinarySensorDescription, SensorDescription
from .device import DeviceKey
from .device_class import DeviceClass
from .library import SensorLibrary
from .sensor.device_class import SensorDeviceClass
from .units import Units
from .value import BaseValue, BinarySensorValue, Event, SensorValue
__all__ = [
"BaseDeviceClass",
"BaseValue",
"BinarySensorValue",
"BinarySensorDescription",
"BinarySensorDeviceClass",
"DeviceClass",
"DeviceKey",
"Event",
"SensorData",
"SensorDescription",
"SensorDeviceClass",
"SensorDeviceInfo",
"SensorLibrary",
"SensorUpdate",
"SensorValue",
"Units",
]
sensor-state-data-2.18.1/src/sensor_state_data/base/ 0000775 0000000 0000000 00000000000 14636552303 0022353 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/src/sensor_state_data/base/__init__.py 0000664 0000000 0000000 00000000210 14636552303 0024455 0 ustar 00root root 0000000 0000000 from __future__ import annotations
from ..enum import StrEnum
class BaseDeviceClass(StrEnum):
"""Base class for device class."""
sensor-state-data-2.18.1/src/sensor_state_data/binary_sensor/ 0000775 0000000 0000000 00000000000 14636552303 0024316 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/src/sensor_state_data/binary_sensor/__init__.py 0000664 0000000 0000000 00000000000 14636552303 0026415 0 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/src/sensor_state_data/binary_sensor/device_class.py 0000664 0000000 0000000 00000004407 14636552303 0027321 0 ustar 00root root 0000000 0000000 # These are currently the same as Home Assistant binary sensors
from ..base import BaseDeviceClass
class BinarySensorDeviceClass(BaseDeviceClass):
"""Device class for binary sensors."""
# On means low, Off means normal
BATTERY = "battery"
# On means charging, Off means not charging
BATTERY_CHARGING = "battery_charging"
# On means carbon monoxide detected, Off means no carbon monoxide (clear)
CO = "carbon_monoxide"
# On means cold, Off means normal
COLD = "cold"
# On means connected, Off means disconnected
CONNECTIVITY = "connectivity"
# On means open, Off means closed
DOOR = "door"
# On means open, Off means closed
GARAGE_DOOR = "garage_door"
# On means gas detected, Off means no gas (clear)
GAS = "gas"
# On means On, Off means Off
GENERIC = "generic"
# On means hot, Off means normal
HEAT = "heat"
# On means light detected, Off means no light
LIGHT = "light"
# On means open (unlocked), Off means closed (locked)
LOCK = "lock"
# On means wet, Off means dry
MOISTURE = "moisture"
# On means motion detected, Off means no motion (clear)
MOTION = "motion"
# On means moving, Off means not moving (stopped)
MOVING = "moving"
# On means occupied, Off means not occupied (clear)
OCCUPANCY = "occupancy"
# On means open, Off means closed
OPENING = "opening"
# On means plugged in, Off means unplugged
PLUG = "plug"
# On means power detected, Off means no power
POWER = "power"
# On means home, Off means away
PRESENCE = "presence"
# On means problem detected, Off means no problem (OK)
PROBLEM = "problem"
# On means running, Off means not running
RUNNING = "running"
# On means unsafe, Off means safe
SAFETY = "safety"
# On means smoke detected, Off means no smoke (clear)
SMOKE = "smoke"
# On means sound detected, Off means no sound (clear)
SOUND = "sound"
# On means tampering detected, Off means no tampering (clear)
TAMPER = "tamper"
# On means update available, Off means up-to-date
UPDATE = "update"
# On means vibration detected, Off means no vibration
VIBRATION = "vibration"
# On means open, Off means closed
WINDOW = "window"
sensor-state-data-2.18.1/src/sensor_state_data/data.py 0000664 0000000 0000000 00000025023 14636552303 0022726 0 ustar 00root root 0000000 0000000 from __future__ import annotations
import dataclasses
from abc import abstractmethod
from datetime import date, datetime
from decimal import Decimal
from typing import Any
from .binary_sensor.device_class import BinarySensorDeviceClass
from .description import (
BaseSensorDescription,
BinarySensorDescription,
SensorDescription,
)
from .device import DeviceKey
from .sensor.device_class import SensorDeviceClass
from .units import Units
from .value import BinarySensorValue, Event, SensorValue
_PRECISION_SENTINEL = -1
@dataclasses.dataclass(frozen=False)
class SensorDeviceInfo:
name: str | None
model: str | None
manufacturer: str | None
sw_version: str | None
hw_version: str | None
@dataclasses.dataclass(frozen=True)
class SensorUpdate:
title: str | None
devices: dict[str | None, SensorDeviceInfo]
entity_descriptions: dict[DeviceKey, SensorDescription] = dataclasses.field(
default_factory=dict
)
entity_values: dict[DeviceKey, SensorValue] = dataclasses.field(
default_factory=dict
)
binary_entity_descriptions: dict[DeviceKey, BinarySensorDescription] = (
dataclasses.field(default_factory=dict)
)
binary_entity_values: dict[DeviceKey, BinarySensorValue] = dataclasses.field(
default_factory=dict
)
events: dict[DeviceKey, Event] = dataclasses.field(default_factory=dict)
class SensorData:
"""Generate a sensor update."""
def __init__(self) -> None:
"""Init sensor data."""
self._title: str | None = None
self._precision = _PRECISION_SENTINEL
self._software_version: str | None = None
self._device_id_info: dict[str | None, SensorDeviceInfo] = {}
self._device_id_to_name: dict[str | None, str] = {}
self._device_id_to_type: dict[str | None, str] = {}
# Sensors
self._sensor_descriptions: dict[DeviceKey, SensorDescription] = {}
self._sensor_descriptions_updates: dict[DeviceKey, SensorDescription] = {}
self._sensor_values: dict[DeviceKey, SensorValue] = {}
self._sensor_values_updates: dict[DeviceKey, SensorValue] = {}
# Binary Sensors
self._binary_sensor_descriptions: dict[DeviceKey, BinarySensorDescription] = {}
self._binary_sensor_descriptions_updates: dict[
DeviceKey, BinarySensorDescription
] = {}
self._binary_sensor_values: dict[DeviceKey, BinarySensorValue] = {}
self._binary_sensor_values_updates: dict[DeviceKey, BinarySensorValue] = {}
# Events
self._events: dict[DeviceKey, Event] = {}
self._events_updates: dict[DeviceKey, Event] = {}
@property
def descriptions(
self,
) -> dict[DeviceKey, SensorDescription]:
"""Return the sensor data."""
return self._sensor_descriptions
@property
def binary_descriptions(
self,
) -> dict[DeviceKey, BinarySensorDescription]:
"""Return the binary sensor data."""
return self._binary_sensor_descriptions
@property
def primary_device_id(self) -> str | None:
"""Return the primary device id."""
if self._device_id_to_type:
return list(self._device_id_to_type)[0]
return None
@property
def precision(self) -> int:
"""Return the precision in decimal places."""
return self._precision
@property
def title(self) -> str | None:
"""Return the title."""
return self._title
def set_title(self, title: str) -> None:
"""Set the title."""
self._title = title
def set_precision(self, precision: int) -> None:
"""Set the precision in decimal places.
This is a convenience method to have native float values
rounded to the expected number of decimal places.
"""
if precision < 0:
self._precision = _PRECISION_SENTINEL
self._precision = precision
def _get_device_info(self, device_id: str | None) -> SensorDeviceInfo:
"""Get device info."""
if device_id not in self._device_id_info:
self._device_id_info[device_id] = SensorDeviceInfo(
None, None, None, None, None
)
return self._device_id_info[device_id]
def set_device_manufacturer(
self, manufacturer: str, device_id: str | None = None
) -> None:
"""Set the device manufacturer."""
self._get_device_info(device_id).manufacturer = manufacturer
def set_device_hw_version(
self, hw_version: str, device_id: str | None = None
) -> None:
"""Set the device hardware version."""
self._get_device_info(device_id).hw_version = hw_version
def set_device_sw_version(
self, sw_version: str, device_id: str | None = None
) -> None:
"""Set the device software version."""
self._get_device_info(device_id).sw_version = sw_version
def set_device_name(self, name: str, device_id: str | None = None) -> None:
"""Set the device name."""
self._device_id_to_name[device_id] = name
self._get_device_info(device_id).name = name
def set_device_type(self, device_type: str, device_id: str | None = None) -> None:
"""Set the device type."""
self._device_id_to_type[device_id] = device_type
self._get_device_info(device_id).model = device_type
@abstractmethod
def _start_update(self, data: Any) -> None:
"""Update the data."""
def supported(self, data: Any) -> bool:
"""Return True if the device is supported."""
self._start_update(data)
return bool(self._device_id_to_type)
def update(self, data: Any) -> SensorUpdate:
"""Update a device."""
# Ensure events from previous
# updates are not carried over
# as events are transient.
self._events_updates.clear()
self._start_update(data)
return self._finish_update()
def _finish_update(self) -> SensorUpdate:
"""Finish the update."""
self._sensor_descriptions.update(self._sensor_descriptions_updates)
self._sensor_values.update(self._sensor_values_updates)
self._binary_sensor_descriptions.update(
self._binary_sensor_descriptions_updates
)
self._binary_sensor_values.update(self._binary_sensor_values_updates)
return SensorUpdate(
title=self._title,
devices=self._device_id_info,
entity_descriptions=self._sensor_descriptions_updates,
entity_values=self._sensor_values_updates,
binary_entity_descriptions=self._binary_sensor_descriptions_updates,
binary_entity_values=self._binary_sensor_values_updates,
events=self._events_updates,
)
def update_predefined_binary_sensor(
self,
device_class: BinarySensorDeviceClass,
native_value: bool | None,
key: str | None = None,
name: str | None = None,
device_id: str | None = None,
) -> None:
"""Update a binary sensor by type."""
assert device_class is not None # nosec
self.update_binary_sensor(
key=key or device_class.value,
name=name,
native_value=native_value,
device_class=device_class,
device_id=device_id,
)
def update_predefined_sensor(
self,
base_description: BaseSensorDescription,
native_value: None | str | int | float | date | datetime | Decimal,
key: str | None = None,
name: str | None = None,
device_id: str | None = None,
) -> None:
"""Update a sensor by type."""
assert base_description.device_class is not None # nosec
self.update_sensor(
key=key or base_description.device_class.value,
name=name,
native_unit_of_measurement=base_description.native_unit_of_measurement,
native_value=native_value,
device_class=base_description.device_class,
device_id=device_id,
)
def _get_key_name(self, key: str, device_id: str | None = None) -> str:
"""Set the device name."""
return key.replace("_", " ").title()
def get_device_name(self, device_id: str | None = None) -> str | None:
"""Get the device name."""
return self._device_id_to_name.get(device_id) or self._device_id_to_type.get(
device_id
)
def update_binary_sensor(
self,
key: str,
native_value: bool | None,
device_class: BinarySensorDeviceClass | None = None,
name: str | None = None,
device_id: str | None = None,
) -> None:
"""Update a sensor by type."""
device_key = DeviceKey(key, device_id)
self._binary_sensor_values_updates[device_key] = BinarySensorValue(
name=name or self._get_key_name(key, device_id),
device_key=device_key,
native_value=native_value,
)
self._binary_sensor_descriptions_updates[device_key] = BinarySensorDescription(
device_key=device_key,
device_class=device_class,
)
def update_sensor(
self,
key: str,
native_unit_of_measurement: Units | None,
native_value: None | str | int | float | date | datetime | Decimal,
device_class: SensorDeviceClass | None = None,
name: str | None = None,
device_id: str | None = None,
) -> None:
"""Update a sensor."""
device_key = DeviceKey(key, device_id)
if self.precision != _PRECISION_SENTINEL and isinstance(native_value, float):
native_value = round(native_value, self.precision)
self._sensor_values_updates[device_key] = SensorValue(
name=name or self._get_key_name(key, device_id),
device_key=device_key,
native_value=native_value,
)
self._sensor_descriptions_updates[device_key] = SensorDescription(
device_key=device_key,
native_unit_of_measurement=native_unit_of_measurement,
device_class=device_class,
)
def fire_event(
self,
key: str,
event_type: str,
event_properties: dict[str, str | int | float | None] | None = None,
name: str | None = None,
device_id: str | None = None,
) -> None:
"""Fire an event."""
device_key = DeviceKey(key, device_id)
self._events_updates[device_key] = Event(
name=name or self._get_key_name(key, device_id),
device_key=device_key,
event_type=event_type,
event_properties=event_properties,
)
sensor-state-data-2.18.1/src/sensor_state_data/description.py 0000664 0000000 0000000 00000002330 14636552303 0024334 0 ustar 00root root 0000000 0000000 from __future__ import annotations
from dataclasses import dataclass
from .base import BaseDeviceClass
from .binary_sensor.device_class import BinarySensorDeviceClass
from .device import DeviceKey
from .sensor.device_class import SensorDeviceClass
from .units import Units
@dataclass(frozen=True)
class BaseDescription:
"""A base class for all descriptions."""
device_class: BaseDeviceClass | None = None
@dataclass(frozen=True)
class BaseBinarySensorDescription(BaseDescription):
device_class: BinarySensorDeviceClass | None = None
@dataclass(frozen=True)
class BaseSensorDescription(BaseDescription):
device_class: SensorDeviceClass | None = None
native_unit_of_measurement: Units | None = None
@dataclass(frozen=True)
class SensorDescriptionIds:
device_key: DeviceKey
@dataclass(frozen=True)
class KeyedBaseDescription(BaseDescription, SensorDescriptionIds):
"""A class for sensors that use a key."""
@dataclass(frozen=True)
class SensorDescription(BaseSensorDescription, KeyedBaseDescription):
"""A class that describes sensors."""
@dataclass(frozen=True)
class BinarySensorDescription(BaseBinarySensorDescription, KeyedBaseDescription):
"""A class that describes binary sensors."""
sensor-state-data-2.18.1/src/sensor_state_data/device.py 0000664 0000000 0000000 00000000401 14636552303 0023245 0 ustar 00root root 0000000 0000000 from __future__ import annotations
import dataclasses
@dataclasses.dataclass(frozen=True)
class DeviceKey:
"""Key for a device.
Example:
device_id: outdoor_sensor_1
key: temperature
"""
key: str
device_id: str | None = None
sensor-state-data-2.18.1/src/sensor_state_data/device_class.py 0000664 0000000 0000000 00000000334 14636552303 0024437 0 ustar 00root root 0000000 0000000 # Supported device classes
from .sensor.device_class import SensorDeviceClass # backwards compatibility
from .sensor.device_class import SensorDeviceClass as DeviceClass
__all__ = ["DeviceClass", "SensorDeviceClass"]
sensor-state-data-2.18.1/src/sensor_state_data/enum.py 0000664 0000000 0000000 00000001262 14636552303 0022760 0 ustar 00root root 0000000 0000000 """Enum backports from standard lib."""
from __future__ import annotations
from enum import Enum
from typing import Any, TypeVar
_StrEnumT = TypeVar("_StrEnumT", bound="StrEnum")
class StrEnum(str, Enum):
"""Partial backport of Python 3.11's StrEnum for our basic use cases."""
def __new__(
cls: type[_StrEnumT], value: str, *args: Any, **kwargs: Any
) -> _StrEnumT:
"""Create a new StrEnum instance."""
if not isinstance(value, str):
raise TypeError(f"{value!r} is not a string")
return super().__new__(cls, value, *args, **kwargs)
def __str__(self) -> str:
"""Return self.value."""
return str(self.value)
sensor-state-data-2.18.1/src/sensor_state_data/library.py 0000664 0000000 0000000 00000017645 14636552303 0023474 0 ustar 00root root 0000000 0000000 from __future__ import annotations
from .description import BaseSensorDescription
from .sensor.device_class import SensorDeviceClass
from .units import Units
class SensorLibrary:
"""A library of sensor common descriptions."""
ACCELERATION__ACCELERATION_METERS_PER_SQUARE_SECOND = BaseSensorDescription(
device_class=SensorDeviceClass.ACCELERATION,
native_unit_of_measurement=Units.ACCELERATION_METERS_PER_SQUARE_SECOND,
)
BATTERY__PERCENTAGE = BaseSensorDescription(
device_class=SensorDeviceClass.BATTERY,
native_unit_of_measurement=Units.PERCENTAGE,
)
CONDUCTIVITY__CONDUCTIVITY = BaseSensorDescription(
device_class=SensorDeviceClass.CONDUCTIVITY,
native_unit_of_measurement=Units.CONDUCTIVITY,
)
COUNT__NONE = BaseSensorDescription(
device_class=SensorDeviceClass.COUNT,
native_unit_of_measurement=None,
)
CO2__CONCENTRATION_PARTS_PER_MILLION = BaseSensorDescription(
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=Units.CONCENTRATION_PARTS_PER_MILLION,
)
CURRENT__ELECTRIC_CURRENT_AMPERE = BaseSensorDescription(
device_class=SensorDeviceClass.CURRENT,
native_unit_of_measurement=Units.ELECTRIC_CURRENT_AMPERE,
)
DEW_POINT__TEMP_CELSIUS = BaseSensorDescription(
device_class=SensorDeviceClass.DEW_POINT,
native_unit_of_measurement=Units.TEMP_CELSIUS,
)
DISTANCE__LENGTH_METERS = BaseSensorDescription(
device_class=SensorDeviceClass.DISTANCE,
native_unit_of_measurement=Units.LENGTH_METERS,
)
DISTANCE__LENGTH_MILLIMETERS = BaseSensorDescription(
device_class=SensorDeviceClass.DISTANCE,
native_unit_of_measurement=Units.LENGTH_MILLIMETERS,
)
DURATION__TIME_SECONDS = BaseSensorDescription(
device_class=SensorDeviceClass.DURATION,
native_unit_of_measurement=Units.TIME_SECONDS,
)
ENERGY__ENERGY_KILO_WATT_HOUR = BaseSensorDescription(
device_class=SensorDeviceClass.ENERGY,
native_unit_of_measurement=Units.ENERGY_KILO_WATT_HOUR,
)
GYROSCOPE__GYROSCOPE_DEGREES_PER_SECOND = BaseSensorDescription(
device_class=SensorDeviceClass.GYROSCOPE,
native_unit_of_measurement=Units.GYROSCOPE_DEGREES_PER_SECOND,
)
FORMALDEHYDE__CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER = BaseSensorDescription(
device_class=SensorDeviceClass.FORMALDEHYDE,
native_unit_of_measurement=Units.CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER,
)
GAS__VOLUME_CUBIC_METERS = BaseSensorDescription(
device_class=SensorDeviceClass.GAS,
native_unit_of_measurement=Units.VOLUME_CUBIC_METERS,
)
HUMIDITY__PERCENTAGE = BaseSensorDescription(
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=Units.PERCENTAGE,
)
IMPEDANCE__OHM = BaseSensorDescription(
device_class=SensorDeviceClass.IMPEDANCE,
native_unit_of_measurement=Units.OHM,
)
KEG_SIZE__VOLUME_LITERS = BaseSensorDescription(
device_class=SensorDeviceClass.KEG_SIZE,
native_unit_of_measurement=Units.VOLUME_LITERS,
)
KEG_TYPE__NONE = BaseSensorDescription(
device_class=SensorDeviceClass.KEG_TYPE,
native_unit_of_measurement=None,
)
LIGHT__LIGHT_LUX = BaseSensorDescription(
device_class=SensorDeviceClass.ILLUMINANCE,
native_unit_of_measurement=Units.LIGHT_LUX,
)
MASS__MASS_KILOGRAMS = BaseSensorDescription(
device_class=SensorDeviceClass.MASS,
native_unit_of_measurement=Units.MASS_KILOGRAMS,
)
MASS__MASS_POUNDS = BaseSensorDescription(
device_class=SensorDeviceClass.MASS,
native_unit_of_measurement=Units.MASS_POUNDS,
)
MOISTURE__PERCENTAGE = BaseSensorDescription(
device_class=SensorDeviceClass.MOISTURE,
native_unit_of_measurement=Units.PERCENTAGE,
)
MASS_NON_STABILIZED__MASS_KILOGRAMS = BaseSensorDescription(
device_class=SensorDeviceClass.MASS_NON_STABILIZED,
native_unit_of_measurement=Units.MASS_KILOGRAMS,
)
PACKET_ID__NONE = BaseSensorDescription(
device_class=SensorDeviceClass.PACKET_ID,
native_unit_of_measurement=None,
)
PM1__CONCENTRATION_MICROGRAMS_PER_CUBIC_METER = BaseSensorDescription(
device_class=SensorDeviceClass.PM1,
native_unit_of_measurement=Units.CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
)
PM10__CONCENTRATION_MICROGRAMS_PER_CUBIC_METER = BaseSensorDescription(
device_class=SensorDeviceClass.PM10,
native_unit_of_measurement=Units.CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
)
PM25__CONCENTRATION_MICROGRAMS_PER_CUBIC_METER = BaseSensorDescription(
device_class=SensorDeviceClass.PM25,
native_unit_of_measurement=Units.CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
)
PORT_COUNT__NONE = BaseSensorDescription(
device_class=SensorDeviceClass.PORT_COUNT,
native_unit_of_measurement=None,
)
PORT_NAME__NONE = BaseSensorDescription(
device_class=SensorDeviceClass.PORT_NAME,
native_unit_of_measurement=None,
)
PORT_STATE__NONE = BaseSensorDescription(
device_class=SensorDeviceClass.PORT_STATE,
native_unit_of_measurement=None,
)
POWER__POWER_WATT = BaseSensorDescription(
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=Units.POWER_WATT,
)
PRESSURE__HPA = BaseSensorDescription(
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=Units.PRESSURE_HPA,
)
PRESSURE__MBAR = BaseSensorDescription(
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=Units.PRESSURE_MBAR,
)
ROTATION__DEGREE = BaseSensorDescription(
device_class=SensorDeviceClass.ROTATION,
native_unit_of_measurement=Units.DEGREE,
)
SPEED__SPEED_METERS_PER_SECOND = BaseSensorDescription(
device_class=SensorDeviceClass.SPEED,
native_unit_of_measurement=Units.SPEED_METERS_PER_SECOND,
)
TEMPERATURE__CELSIUS = BaseSensorDescription(
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=Units.TEMP_CELSIUS,
)
TIMESTAMP__NONE = BaseSensorDescription(
device_class=SensorDeviceClass.TIMESTAMP,
native_unit_of_measurement=None,
)
UV_INDEX__NONE = BaseSensorDescription(
device_class=SensorDeviceClass.UV_INDEX,
native_unit_of_measurement=None,
)
VOLATILE_ORGANIC_COMPOUNDS__CONCENTRATION_MICROGRAMS_PER_CUBIC_METER = (
BaseSensorDescription(
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS,
native_unit_of_measurement=Units.CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
)
)
VOLTAGE__ELECTRIC_POTENTIAL_VOLT = BaseSensorDescription(
device_class=SensorDeviceClass.VOLTAGE,
native_unit_of_measurement=Units.ELECTRIC_POTENTIAL_VOLT,
)
VOLUME_DISPENSED__VOLUME_LITERS = BaseSensorDescription(
device_class=SensorDeviceClass.VOLUME_DISPENSED,
native_unit_of_measurement=Units.VOLUME_LITERS,
)
VOLUME_FLOW_RATE__VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR = BaseSensorDescription(
device_class=SensorDeviceClass.VOLUME_FLOW_RATE,
native_unit_of_measurement=Units.VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR,
)
VOLUME_START__VOLUME_LITERS = BaseSensorDescription(
device_class=SensorDeviceClass.VOLUME_START,
native_unit_of_measurement=Units.VOLUME_LITERS,
)
VOLUME__VOLUME_LITERS = BaseSensorDescription(
device_class=SensorDeviceClass.VOLUME,
native_unit_of_measurement=Units.VOLUME_LITERS,
)
VOLUME__VOLUME_MILLILITERS = BaseSensorDescription(
device_class=SensorDeviceClass.VOLUME,
native_unit_of_measurement=Units.VOLUME_MILLILITERS,
)
WATER__VOLUME_LITERS = BaseSensorDescription(
device_class=SensorDeviceClass.WATER,
native_unit_of_measurement=Units.VOLUME_LITERS,
)
sensor-state-data-2.18.1/src/sensor_state_data/py.typed 0000664 0000000 0000000 00000000000 14636552303 0023126 0 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/src/sensor_state_data/sensor/ 0000775 0000000 0000000 00000000000 14636552303 0022752 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/src/sensor_state_data/sensor/__init__.py 0000664 0000000 0000000 00000000000 14636552303 0025051 0 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/src/sensor_state_data/sensor/device_class.py 0000664 0000000 0000000 00000006762 14636552303 0025763 0 ustar 00root root 0000000 0000000 # Supported device classes
from ..base import BaseDeviceClass
class SensorDeviceClass(BaseDeviceClass):
"""Device class for sensors."""
# acceleration (mG)
ACCELERATION = "acceleration"
# apparent power (VA)
APPARENT_POWER = "apparent_power"
# Air Quality Index
AQI = "aqi"
# % of battery that is left
BATTERY = "battery"
# ppm (parts per million) Carbon Monoxide gas concentration
CO = "carbon_monoxide"
# ppm (parts per million) Carbon Dioxide gas concentration
CO2 = "carbon_dioxide"
# conductivity (µS/cm)
CONDUCTIVITY = "conductivity"
# count (no unit)
COUNT = "count"
# current (A)
CURRENT = "current"
# date (ISO8601)
DATE = "date"
# dew point (°C, F)
DEW_POINT = "dew_point"
# distance (mm, m)
DISTANCE = "distance"
# fixed duration (TIME_DAYS, TIME_HOURS, TIME_MINUTES, TIME_SECONDS)
DURATION = "duration"
# energy (Wh, kWh, MWh)
ENERGY = "energy"
# Volume flow rate (m3 per hour)
VOLUME_FLOW_RATE = "volume_flow_rate"
# formaldehyde (µg/m³)
FORMALDEHYDE = "formaldehyde"
# frequency (Hz, kHz, MHz, GHz)
FREQUENCY = "frequency"
# gas (m³ or ft³)
GAS = "gas"
# gyroscope (° per second)
GYROSCOPE = "gyroscope"
# % of humidity in the air
HUMIDITY = "humidity"
# current light level (lx/lm)
ILLUMINANCE = "illuminance"
# impedance (Ohm)
IMPEDANCE = "impedance"
# keg size (L)
KEG_SIZE = "keg_size"
# keg type (no unit)
KEG_TYPE = "keg_type"
# % of moisture in the air or soil
MOISTURE = "moisture"
# mass (g, kg, lbs)
MASS = "mass"
# mass non-stabilized (kg/lbs)
MASS_NON_STABILIZED = "mass_non_stabilized"
# Amount of money (currency)
MONETARY = "monetary"
# Amount of NO2 (µg/m³)
NITROGEN_DIOXIDE = "nitrogen_dioxide"
# Amount of NO (µg/m³)
NITROGEN_MONOXIDE = "nitrogen_monoxide"
# Amount of N2O (µg/m³)
NITROUS_OXIDE = "nitrous_oxide"
# Amount of O3 (µg/m³)
OZONE = "ozone"
# Packet id (no unit)
PACKET_ID = "packet_id"
# Particulate matter <= 0.1 μm (µg/m³)
PM1 = "pm1"
# Particulate matter <= 10 μm (µg/m³)
PM10 = "pm10"
# Particulate matter <= 2.5 μm (µg/m³)
PM25 = "pm25"
# Port count (no unit)
PORT_COUNT = "port_count"
# Port name (no unit)
PORT_NAME = "port_name"
# Port state (no unit)
PORT_STATE = "port_state"
# power factor (%)
POWER_FACTOR = "power_factor"
# power (W/kW)
POWER = "power"
# pressure (hPa/mbar)
PRESSURE = "pressure"
# rotation (°)
ROTATION = "rotation"
# reactive power (var)
REACTIVE_POWER = "reactive_power"
# signal strength (dB/dBm)
SIGNAL_STRENGTH = "signal_strength"
# specific gravity
SPECIFIC_GRAVITY = "specific_gravity"
# speed (m/s)
SPEED = "speed"
# Amount of SO2 (µg/m³)
SULPHUR_DIOXIDE = "sulphur_dioxide"
# temperature (°C/F)
TEMPERATURE = "temperature"
# time (s)
TIME = "time"
# timestamp (ISO8601)
TIMESTAMP = "timestamp"
# UV index (no unit)
UV_INDEX = "uv_index"
# Amount of VOC (µg/m³)
VOLATILE_ORGANIC_COMPOUNDS = "volatile_organic_compounds"
# voltage (V)
VOLTAGE = "voltage"
# Volume (ml, L)
VOLUME = "volume"
# Volume dispensed (L)
VOLUME_DISPENSED = "volume_dispensed"
# Volume start (L)
VOLUME_START = "volume_start"
# Water (L)
WATER = "water"
sensor-state-data-2.18.1/src/sensor_state_data/units.py 0000664 0000000 0000000 00000013421 14636552303 0023156 0 ustar 00root root 0000000 0000000 from __future__ import annotations
from typing import Final
from .enum import StrEnum
# These are currently the same as Home Assistant sensors
class Units(StrEnum):
# #### UNITS OF MEASUREMENT ####
# Apparent power units
POWER_VOLT_AMPERE: Final = "VA"
# Power units
POWER_WATT: Final = "W"
POWER_KILO_WATT: Final = "kW"
POWER_BTU_PER_HOUR: Final = "BTU/h"
# Reactive power units
POWER_VOLT_AMPERE_REACTIVE: Final = "var"
# Energy units
ENERGY_WATT_HOUR: Final = "Wh"
ENERGY_KILO_WATT_HOUR: Final = "kWh"
ENERGY_MEGA_WATT_HOUR: Final = "MWh"
# Electric_current units
ELECTRIC_CURRENT_MILLIAMPERE: Final = "mA"
ELECTRIC_CURRENT_AMPERE: Final = "A"
# Electric_potential units
ELECTRIC_POTENTIAL_MILLIVOLT: Final = "mV"
ELECTRIC_POTENTIAL_VOLT: Final = "V"
# Degree units
DEGREE: Final = "°"
# Currency units
CURRENCY_EURO: Final = "€"
CURRENCY_DOLLAR: Final = "$"
CURRENCY_CENT: Final = "¢"
# Temperature units
TEMP_CELSIUS: Final = "°C"
TEMP_FAHRENHEIT: Final = "°F"
TEMP_KELVIN: Final = "K"
# Time units
TIME_MICROSECONDS: Final = "μs"
TIME_MILLISECONDS: Final = "ms"
TIME_SECONDS: Final = "s"
TIME_MINUTES: Final = "min"
TIME_HOURS: Final = "h"
TIME_DAYS: Final = "d"
TIME_WEEKS: Final = "w"
TIME_MONTHS: Final = "m"
TIME_YEARS: Final = "y"
# Length units
LENGTH_MILLIMETERS: Final = "mm"
LENGTH_CENTIMETERS: Final = "cm"
LENGTH_METERS: Final = "m"
LENGTH_KILOMETERS: Final = "km"
LENGTH_INCHES: Final = "in"
LENGTH_FEET: Final = "ft"
LENGTH_YARD: Final = "yd"
LENGTH_MILES: Final = "mi"
# Frequency units
FREQUENCY_HERTZ: Final = "Hz"
FREQUENCY_KILOHERTZ: Final = "kHz"
FREQUENCY_MEGAHERTZ: Final = "MHz"
FREQUENCY_GIGAHERTZ: Final = "GHz"
# Pressure units
PRESSURE_PA: Final = "Pa"
PRESSURE_HPA: Final = "hPa"
PRESSURE_KPA: Final = "kPa"
PRESSURE_BAR: Final = "bar"
PRESSURE_CBAR: Final = "cbar"
PRESSURE_MBAR: Final = "mbar"
PRESSURE_MMHG: Final = "mmHg"
PRESSURE_INHG: Final = "inHg"
PRESSURE_PSI: Final = "psi"
# Sound pressure units
SOUND_PRESSURE_DB: Final = "dB"
SOUND_PRESSURE_WEIGHTED_DBA: Final = "dBa"
# Volume units
VOLUME_LITERS: Final = "L"
VOLUME_MILLILITERS: Final = "mL"
VOLUME_CUBIC_METERS: Final = "m³"
VOLUME_CUBIC_FEET: Final = "ft³"
VOLUME_GALLONS: Final = "gal"
VOLUME_FLUID_OUNCE: Final = "fl. oz."
# Volume Flow Rate units
VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR: Final = "m³/h"
VOLUME_FLOW_RATE_CUBIC_FEET_PER_MINUTE: Final = "ft³/m"
# Area units
AREA_SQUARE_METERS: Final = "m²"
# Mass units
MASS_GRAMS: Final = "g"
MASS_KILOGRAMS: Final = "kg"
MASS_MILLIGRAMS: Final = "mg"
MASS_MICROGRAMS: Final = "µg"
MASS_OUNCES: Final = "oz"
MASS_POUNDS: Final = "lb"
# Impedance units
OHM: Final = "ohm"
# Conductivity units
CONDUCTIVITY: Final = "µS/cm"
# Light units
LIGHT_LUX: Final = "lx"
# UV Index units
UV_INDEX: Final = "UV index"
# Percentage units
PERCENTAGE: Final = "%"
# Irradiation units
IRRADIATION_WATTS_PER_SQUARE_METER: Final = "W/m²"
IRRADIATION_BTUS_PER_HOUR_SQUARE_FOOT: Final = "BTU/(h×ft²)"
# Precipitation units
PRECIPITATION_MILLIMETERS_PER_HOUR: Final = "mm/h"
PRECIPITATION_INCHES: Final = "in"
PRECIPITATION_INCHES_PER_HOUR: Final = "in/h"
# Concentration units
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER: Final = "µg/m³"
CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER: Final = "mg/m³"
CONCENTRATION_MICROGRAMS_PER_CUBIC_FOOT: Final = "μg/ft³"
CONCENTRATION_PARTS_PER_CUBIC_METER: Final = "p/m³"
CONCENTRATION_PARTS_PER_MILLION: Final = "ppm"
CONCENTRATION_PARTS_PER_BILLION: Final = "ppb"
# Speed units
SPEED_MILLIMETERS_PER_DAY: Final = "mm/d"
SPEED_FEET_PER_SECOND: Final = "ft/s"
SPEED_INCHES_PER_DAY: Final = "in/d"
SPEED_METERS_PER_SECOND: Final = "m/s"
SPEED_INCHES_PER_HOUR: Final = "in/h"
SPEED_KILOMETERS_PER_HOUR: Final = "km/h"
SPEED_KNOTS: Final = "kn"
SPEED_MILES_PER_HOUR: Final = "mph"
# Acceleration units
ACCELERATION_METERS_PER_SQUARE_SECOND: Final = "m/s²"
# Gyroscope units
GYROSCOPE_DEGREES_PER_SECOND: Final = "°/s"
# Signal_strength units
SIGNAL_STRENGTH_DECIBELS: Final = "dB"
SIGNAL_STRENGTH_DECIBELS_MILLIWATT: Final = "dBm"
# Data units
DATA_BITS: Final = "bit"
DATA_KILOBITS: Final = "kbit"
DATA_MEGABITS: Final = "Mbit"
DATA_GIGABITS: Final = "Gbit"
DATA_BYTES: Final = "B"
DATA_KILOBYTES: Final = "kB"
DATA_MEGABYTES: Final = "MB"
DATA_GIGABYTES: Final = "GB"
DATA_TERABYTES: Final = "TB"
DATA_PETABYTES: Final = "PB"
DATA_EXABYTES: Final = "EB"
DATA_ZETTABYTES: Final = "ZB"
DATA_YOTTABYTES: Final = "YB"
DATA_KIBIBYTES: Final = "KiB"
DATA_MEBIBYTES: Final = "MiB"
DATA_GIBIBYTES: Final = "GiB"
DATA_TEBIBYTES: Final = "TiB"
DATA_PEBIBYTES: Final = "PiB"
DATA_EXBIBYTES: Final = "EiB"
DATA_ZEBIBYTES: Final = "ZiB"
DATA_YOBIBYTES: Final = "YiB"
# Data_rate units
DATA_RATE_BITS_PER_SECOND: Final = "bit/s"
DATA_RATE_KILOBITS_PER_SECOND: Final = "kbit/s"
DATA_RATE_MEGABITS_PER_SECOND: Final = "Mbit/s"
DATA_RATE_GIGABITS_PER_SECOND: Final = "Gbit/s"
DATA_RATE_BYTES_PER_SECOND: Final = "B/s"
DATA_RATE_KILOBYTES_PER_SECOND: Final = "kB/s"
DATA_RATE_MEGABYTES_PER_SECOND: Final = "MB/s"
DATA_RATE_GIGABYTES_PER_SECOND: Final = "GB/s"
DATA_RATE_KIBIBYTES_PER_SECOND: Final = "KiB/s"
DATA_RATE_MEBIBYTES_PER_SECOND: Final = "MiB/s"
DATA_RATE_GIBIBYTES_PER_SECOND: Final = "GiB/s"
# Specific gravity units
SPECIFIC_GRAVITY = "SG"
sensor-state-data-2.18.1/src/sensor_state_data/value.py 0000664 0000000 0000000 00000001364 14636552303 0023133 0 ustar 00root root 0000000 0000000 from __future__ import annotations
from dataclasses import dataclass
from datetime import date, datetime
from decimal import Decimal
from .device import DeviceKey
@dataclass(frozen=True)
class BaseValue:
device_key: DeviceKey
name: str | None
@dataclass(frozen=True)
class SensorValue(BaseValue):
"""A class that describes sensor values."""
native_value: str | int | float | date | datetime | Decimal | None
@dataclass(frozen=True)
class BinarySensorValue(BaseValue):
"""A class that describes sensor values."""
native_value: bool | None
@dataclass(frozen=True)
class Event(BaseValue):
"""A class that describes device events."""
event_type: str
event_properties: dict[str, str | int | float | None] | None
sensor-state-data-2.18.1/tests/ 0000775 0000000 0000000 00000000000 14636552303 0016312 5 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/tests/__init__.py 0000664 0000000 0000000 00000000000 14636552303 0020411 0 ustar 00root root 0000000 0000000 sensor-state-data-2.18.1/tests/test_enum.py 0000664 0000000 0000000 00000000252 14636552303 0020666 0 ustar 00root root 0000000 0000000 import pytest
from sensor_state_data.enum import StrEnum
def test_non_str():
with pytest.raises(TypeError):
class DeviceClass(StrEnum):
X = 1
sensor-state-data-2.18.1/tests/test_init.py 0000664 0000000 0000000 00000016114 14636552303 0020671 0 ustar 00root root 0000000 0000000 from typing import Any
from sensor_state_data import (
BinarySensorDeviceClass,
DeviceClass,
DeviceKey,
Event,
SensorData,
SensorDescription,
SensorDeviceClass,
SensorLibrary,
SensorUpdate,
SensorValue,
Units,
)
def test_sensor_device_class():
assert DeviceClass.TEMPERATURE == "temperature"
assert str(DeviceClass.TEMPERATURE) == "temperature" # type: ignore[unreachable]
def test_binary_sensor_device_class():
assert BinarySensorDeviceClass.POWER == "power"
assert str(BinarySensorDeviceClass.POWER) == "power" # type: ignore[unreachable]
def test_no_precision():
class MySensorData(SensorData):
def _start_update(self, data: Any) -> None:
self.update_predefined_sensor(
SensorLibrary.TEMPERATURE__CELSIUS, 30.3232039
)
data = MySensorData()
update = data.update(b"")
assert update == SensorUpdate(
title=None,
devices={},
entity_descriptions={
DeviceKey(key="temperature", device_id=None): SensorDescription(
device_key=DeviceKey(key="temperature", device_id=None),
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=Units.TEMP_CELSIUS,
)
},
entity_values={
DeviceKey(key="temperature", device_id=None): SensorValue(
device_key=DeviceKey(key="temperature", device_id=None),
name="Temperature",
native_value=30.3232039,
)
},
binary_entity_descriptions={},
binary_entity_values={},
events={},
)
def test_with_precision():
class MySensorData(SensorData):
def _start_update(self, data: Any) -> None:
self.set_precision(2)
self.update_predefined_sensor(
SensorLibrary.TEMPERATURE__CELSIUS, 30.3232039
)
data = MySensorData()
update = data.update(b"")
assert update == SensorUpdate(
title=None,
devices={},
entity_descriptions={
DeviceKey(key="temperature", device_id=None): SensorDescription(
device_key=DeviceKey(key="temperature", device_id=None),
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=Units.TEMP_CELSIUS,
)
},
entity_values={
DeviceKey(key="temperature", device_id=None): SensorValue(
device_key=DeviceKey(key="temperature", device_id=None),
name="Temperature",
native_value=30.32,
)
},
binary_entity_descriptions={},
binary_entity_values={},
events={},
)
def test_with_precision_between_updates():
class MySensorData(SensorData):
def _start_update(self, data: Any) -> None:
self.set_precision(2)
self.update_predefined_sensor(
SensorLibrary.TEMPERATURE__CELSIUS, 30.3232039
)
self.set_precision(4)
self.update_predefined_sensor(
SensorLibrary.TEMPERATURE__CELSIUS, 30.3232039
)
data = MySensorData()
update = data.update(b"")
assert update == SensorUpdate(
title=None,
devices={},
entity_descriptions={
DeviceKey(key="temperature", device_id=None): SensorDescription(
device_key=DeviceKey(key="temperature", device_id=None),
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=Units.TEMP_CELSIUS,
)
},
entity_values={
DeviceKey(key="temperature", device_id=None): SensorValue(
device_key=DeviceKey(key="temperature", device_id=None),
name="Temperature",
native_value=30.3232,
)
},
binary_entity_descriptions={},
binary_entity_values={},
events={},
)
def test_with_precision_does_not_add_trailing_zeros():
class MySensorData(SensorData):
def _start_update(self, data: Any) -> None:
self.set_precision(2)
self.update_predefined_sensor(SensorLibrary.TEMPERATURE__CELSIUS, 30.9999)
self.update_predefined_sensor(SensorLibrary.HUMIDITY__PERCENTAGE, 30)
data = MySensorData()
update = data.update(b"")
assert update == SensorUpdate(
title=None,
devices={},
entity_descriptions={
DeviceKey(key="temperature", device_id=None): SensorDescription(
device_key=DeviceKey(key="temperature", device_id=None),
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=Units.TEMP_CELSIUS,
),
DeviceKey(key="humidity", device_id=None): SensorDescription(
device_key=DeviceKey(key="humidity", device_id=None),
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=Units.PERCENTAGE,
),
},
entity_values={
DeviceKey(key="temperature", device_id=None): SensorValue(
device_key=DeviceKey(key="temperature", device_id=None),
name="Temperature",
native_value=31.0,
),
DeviceKey(key="humidity", device_id=None): SensorValue(
device_key=DeviceKey(key="humidity", device_id=None),
name="Humidity",
native_value=30,
),
},
binary_entity_descriptions={},
binary_entity_values={},
events={},
)
def test_event():
update_count = 0
class MySensorData(SensorData):
def _start_update(self, data: Any) -> None:
nonlocal update_count
update_count += 1
self.fire_event(
key="dimmer",
event_type=f"rotate_left_{update_count}",
event_properties={"steps": 3},
device_id="living_room",
)
data = MySensorData()
update = data.update(b"")
assert update == SensorUpdate(
title=None,
devices={},
entity_descriptions={},
entity_values={},
binary_entity_descriptions={},
binary_entity_values={},
events={
DeviceKey(key="dimmer", device_id="living_room"): Event(
device_key=DeviceKey(key="dimmer", device_id="living_room"),
name="Dimmer",
event_type="rotate_left_1",
event_properties={"steps": 3},
)
},
)
update = data.update(b"")
assert update == SensorUpdate(
title=None,
devices={},
entity_descriptions={},
entity_values={},
binary_entity_descriptions={},
binary_entity_values={},
events={
DeviceKey(key="dimmer", device_id="living_room"): Event(
device_key=DeviceKey(key="dimmer", device_id="living_room"),
name="Dimmer",
event_type="rotate_left_2",
event_properties={"steps": 3},
)
},
)