pax_global_header 0000666 0000000 0000000 00000000064 14305765043 0014521 g ustar 00root root 0000000 0000000 52 comment=fd5b484617a70e968de8a9d9fc10336a2024d911
Bluetooth-Devices-tilt-ble-b647228/ 0000775 0000000 0000000 00000000000 14305765043 0017040 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/.all-contributorsrc 0000664 0000000 0000000 00000000457 14305765043 0022677 0 ustar 00root root 0000000 0000000 {
"projectName": "tilt-ble",
"projectOwner": "Bluetooth-Devices",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 80,
"commit": true,
"commitConvention": "angular",
"contributors": [],
"contributorsPerLine": 7,
"skipCi": true
}
Bluetooth-Devices-tilt-ble-b647228/.editorconfig 0000664 0000000 0000000 00000000444 14305765043 0021517 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
Bluetooth-Devices-tilt-ble-b647228/.flake8 0000664 0000000 0000000 00000000055 14305765043 0020213 0 ustar 00root root 0000000 0000000 [flake8]
exclude = docs
max-line-length = 88
Bluetooth-Devices-tilt-ble-b647228/.github/ 0000775 0000000 0000000 00000000000 14305765043 0020400 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/.github/FUNDING.yml 0000664 0000000 0000000 00000000026 14305765043 0022213 0 ustar 00root root 0000000 0000000 github: ["apt-itude"]
Bluetooth-Devices-tilt-ble-b647228/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 14305765043 0022563 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/.github/ISSUE_TEMPLATE/1-bug_report.md 0000664 0000000 0000000 00000000422 14305765043 0025411 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.
Bluetooth-Devices-tilt-ble-b647228/.github/ISSUE_TEMPLATE/2-feature-request.md 0000664 0000000 0000000 00000000672 14305765043 0026372 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.
Bluetooth-Devices-tilt-ble-b647228/.github/labels.toml 0000664 0000000 0000000 00000003515 14305765043 0022543 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"
Bluetooth-Devices-tilt-ble-b647228/.github/workflows/ 0000775 0000000 0000000 00000000000 14305765043 0022435 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/.github/workflows/ci.yml 0000664 0000000 0000000 00000003730 14305765043 0023556 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.9"
- uses: pre-commit/action@v2.0.3
# 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@v4.1.11
test:
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
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: relekang/python-semantic-release@v7.31.4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
Bluetooth-Devices-tilt-ble-b647228/.github/workflows/hacktoberfest.yml 0000664 0000000 0000000 00000000534 14305765043 0026006 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 }}
Bluetooth-Devices-tilt-ble-b647228/.github/workflows/issue-manager.yml 0000664 0000000 0000000 00000001340 14305765043 0025716 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."
}
}
Bluetooth-Devices-tilt-ble-b647228/.github/workflows/labels.yml 0000664 0000000 0000000 00000000774 14305765043 0024432 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
Bluetooth-Devices-tilt-ble-b647228/.gitignore 0000664 0000000 0000000 00000004066 14305765043 0021036 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/
Bluetooth-Devices-tilt-ble-b647228/.gitpod.yml 0000664 0000000 0000000 00000000306 14305765043 0021126 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
Bluetooth-Devices-tilt-ble-b647228/.idea/ 0000775 0000000 0000000 00000000000 14305765043 0020020 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/.idea/tilt-ble.iml 0000664 0000000 0000000 00000000515 14305765043 0022240 0 ustar 00root root 0000000 0000000
Bluetooth-Devices-tilt-ble-b647228/.idea/watcherTasks.xml 0000664 0000000 0000000 00000005253 14305765043 0023212 0 ustar 00root root 0000000 0000000
Bluetooth-Devices-tilt-ble-b647228/.idea/workspace.xml 0000664 0000000 0000000 00000002724 14305765043 0022545 0 ustar 00root root 0000000 0000000
Bluetooth-Devices-tilt-ble-b647228/.pre-commit-config.yaml 0000664 0000000 0000000 00000003306 14305765043 0023323 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.31.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.3
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
additional_dependencies: []
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args: [-x, tests]
Bluetooth-Devices-tilt-ble-b647228/.readthedocs.yml 0000664 0000000 0000000 00000001004 14305765043 0022121 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
Bluetooth-Devices-tilt-ble-b647228/CHANGELOG.md 0000664 0000000 0000000 00000003065 14305765043 0020655 0 ustar 00root root 0000000 0000000 # Changelog
## v0.2.3 (2022-09-07)
### Fix
* Downgrade logger to debug ([#7](https://github.com/Bluetooth-Devices/tilt-ble/issues/7)) ([`2398574`](https://github.com/Bluetooth-Devices/tilt-ble/commit/239857470ddd04a2e2e6aa0ef8b035ecdaf948b2))
## v0.2.2 (2022-08-31)
### Fix
* Change GitHub org to Bluetooth-Devices ([#6](https://github.com/Bluetooth-Devices/tilt-ble/issues/6)) ([`a14eb5c`](https://github.com/Bluetooth-Devices/tilt-ble/commit/a14eb5c9c17538c66b10cdf833a375e80f9e7d01))
## v0.2.1 (2022-08-31)
### Fix
* Use specific gravity device class and units from sensor-state-data ([#5](https://github.com/Bluetooth-Devices/tilt-ble/issues/5)) ([`309875b`](https://github.com/Bluetooth-Devices/tilt-ble/commit/309875b4a7c8ea01c7ac8af4b0df645a0a224399))
## v0.2.0 (2022-08-30)
### Feature
* Setup first publish ([#4](https://github.com/Bluetooth-Devices/tilt-ble/issues/4)) ([`3553b93`](https://github.com/Bluetooth-Devices/tilt-ble/commit/3553b934c5676bd9f101ab26b9e646462c559b0f))
* Initial implementation ([#1](https://github.com/Bluetooth-Devices/tilt-ble/issues/1)) ([`d770f6a`](https://github.com/Bluetooth-Devices/tilt-ble/commit/d770f6ae9af5f2bdd127023bae4b8fa3d045f58c))
### Fix
* Deps ([#3](https://github.com/Bluetooth-Devices/tilt-ble/issues/3)) ([`6f28786`](https://github.com/Bluetooth-Devices/tilt-ble/commit/6f287862b1d52b90a433d137595066e0fb5bf5dc))
* Lint ([#2](https://github.com/Bluetooth-Devices/tilt-ble/issues/2)) ([`ca74cd5`](https://github.com/Bluetooth-Devices/tilt-ble/commit/ca74cd5f6dfbdb96c890e92bd6f2bffe78a57f03))
Bluetooth-Devices-tilt-ble-b647228/CONTRIBUTING.md 0000664 0000000 0000000 00000007416 14305765043 0021301 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
Tilt BLE could always use more documentation, whether as part of the official Tilt BLE 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/tilt-ble.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/Bluetooth-Devices/tilt-ble/issues
Bluetooth-Devices-tilt-ble-b647228/LICENSE 0000664 0000000 0000000 00000002064 14305765043 0020047 0 ustar 00root root 0000000 0000000
MIT License
Copyright (c) 2022 Alexander Thompson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Bluetooth-Devices-tilt-ble-b647228/README.md 0000664 0000000 0000000 00000006626 14305765043 0020331 0 ustar 00root root 0000000 0000000 # Tilt BLE
Parser for Tilt BLE devices
## Installation
Install this via pip (or your favourite package manager):
`pip install tilt-ble`
## 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.
Bluetooth-Devices-tilt-ble-b647228/commitlint.config.js 0000664 0000000 0000000 00000000364 14305765043 0023024 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],
},
};
Bluetooth-Devices-tilt-ble-b647228/docs/ 0000775 0000000 0000000 00000000000 14305765043 0017770 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/docs/Makefile 0000664 0000000 0000000 00000001175 14305765043 0021434 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)
Bluetooth-Devices-tilt-ble-b647228/docs/make.bat 0000664 0000000 0000000 00000001374 14305765043 0021402 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
Bluetooth-Devices-tilt-ble-b647228/docs/source/ 0000775 0000000 0000000 00000000000 14305765043 0021270 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/docs/source/_static/ 0000775 0000000 0000000 00000000000 14305765043 0022716 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/docs/source/_static/.gitkeep 0000664 0000000 0000000 00000000000 14305765043 0024335 0 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/docs/source/changelog.md 0000664 0000000 0000000 00000000045 14305765043 0023540 0 ustar 00root root 0000000 0000000 ```{include} ../../CHANGELOG.md
```
Bluetooth-Devices-tilt-ble-b647228/docs/source/conf.py 0000664 0000000 0000000 00000003660 14305765043 0022574 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 = "Tilt BLE"
copyright = "2020, Alexander Thompson"
author = "Alexander Thompson"
# -- 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"]
Bluetooth-Devices-tilt-ble-b647228/docs/source/contributing.md 0000664 0000000 0000000 00000000050 14305765043 0024314 0 ustar 00root root 0000000 0000000 ```{include} ../../CONTRIBUTING.md
```
Bluetooth-Devices-tilt-ble-b647228/docs/source/index.md 0000664 0000000 0000000 00000000350 14305765043 0022717 0 ustar 00root root 0000000 0000000 # Welcome to Tilt BLE documentation!
```{toctree}
:caption: Installation & Usage
:maxdepth: 2
installation
usage
```
```{toctree}
:caption: Project Info
:maxdepth: 2
changelog
contributing
```
```{include} ../../README.md
```
Bluetooth-Devices-tilt-ble-b647228/docs/source/installation.md 0000664 0000000 0000000 00000000263 14305765043 0024314 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 tilt-ble
```
Bluetooth-Devices-tilt-ble-b647228/docs/source/usage.md 0000664 0000000 0000000 00000000136 14305765043 0022716 0 ustar 00root root 0000000 0000000 # Usage
To use this package, import it:
```python
import tilt_ble
```
TODO: Document usage
Bluetooth-Devices-tilt-ble-b647228/poetry.lock 0000664 0000000 0000000 00000044047 14305765043 0021245 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 = "22.1.0"
description = "Classes Without Boilerplate"
category = "dev"
optional = false
python-versions = ">=3.5"
[package.extras]
tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"]
tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"]
docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"]
dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"]
[[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 = "bleak"
version = "0.15.1"
description = "Bluetooth Low Energy platform Agnostic Klient"
category = "main"
optional = false
python-versions = "*"
[package.dependencies]
bleak-winrt = {version = ">=1.1.1", markers = "platform_system == \"Windows\""}
dbus-next = {version = "*", markers = "platform_system == \"Linux\""}
pyobjc-core = {version = "*", markers = "platform_system == \"Darwin\""}
pyobjc-framework-CoreBluetooth = {version = "*", markers = "platform_system == \"Darwin\""}
pyobjc-framework-libdispatch = {version = "*", markers = "platform_system == \"Darwin\""}
typing-extensions = ">=4.2.0"
[[package]]
name = "bleak-winrt"
version = "1.1.1"
description = "Python WinRT bindings for Bleak"
category = "main"
optional = false
python-versions = "*"
[[package]]
name = "bluetooth-sensor-state-data"
version = "1.6.0"
description = "Models for storing and converting Bluetooth Sensor State Data"
category = "main"
optional = false
python-versions = ">=3.9,<4.0"
[package.dependencies]
home-assistant-bluetooth = ">=1.3.0"
sensor-state-data = ">=2.0"
[package.extras]
docs = ["sphinx-rtd-theme (>=1.0,<2.0)", "myst-parser (>=0.18,<0.19)", "Sphinx (>=5.0,<6.0)"]
[[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.1"
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 = "6.4.4"
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 = "dbus-next"
version = "0.2.3"
description = "A zero-dependency DBus library for Python with asyncio support"
category = "main"
optional = false
python-versions = ">=3.6.0"
[[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 = "home-assistant-bluetooth"
version = "1.4.0"
description = "Home Assistant Bluetooth Models and Helpers"
category = "main"
optional = false
python-versions = ">=3.9,<4.0"
[package.dependencies]
bleak = ">=0.14.3"
[[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 = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"]
perf = ["ipython"]
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"]
[[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]
testing = ["pytest-regressions", "pytest-cov", "pytest", "coverage"]
rtd = ["sphinx-book-theme", "sphinx-design", "sphinx-copybutton", "sphinx", "pyyaml", "myst-parser", "attrs"]
profiling = ["gprof2dot"]
plugins = ["mdit-py-plugins"]
linkify = ["linkify-it-py (>=1.0,<2.0)"]
compare = ["panflute (>=2.1.3,<2.2.0)", "mistune (>=2.0.2,<2.1.0)", "mistletoe (>=0.8.1,<0.9.0)", "markdown (>=3.3.6,<3.4.0)", "commonmark (>=0.9.1,<0.10.0)"]
code_style = ["pre-commit (==2.6)"]
benchmarking = ["pytest-benchmark (>=3.2,<4.0)", "pytest", "psutil"]
[[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]
testing = ["pytest-regressions", "pytest-cov", "pytest (>=3.6,<4)", "coverage"]
rtd = ["sphinx-book-theme (>=0.1.0,<0.2.0)", "myst-parser (>=0.14.0,<0.15.0)"]
code_style = ["pre-commit (==2.6)"]
[[package]]
name = "mdurl"
version = "0.1.2"
description = "Markdown URL utilities"
category = "main"
optional = true
python-versions = ">=3.7"
[[package]]
name = "mypy"
version = "0.971"
description = "Optional static typing for Python"
category = "dev"
optional = false
python-versions = ">=3.6"
[package.dependencies]
mypy-extensions = ">=0.4.3"
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
typing-extensions = ">=3.10"
[package.extras]
dmypy = ["psutil (>=4.0)"]
python2 = ["typed-ast (>=1.4.0,<2)"]
reports = ["lxml"]
[[package]]
name = "mypy-extensions"
version = "0.4.3"
description = "Experimental type system extensions for programs checked with the mypy typechecker."
category = "dev"
optional = false
python-versions = "*"
[[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]
testing = ["sphinx-pytest", "pytest-param-files (>=0.3.4,<0.4.0)", "pytest-regressions", "pytest-cov", "pytest (>=6,<7)", "coverage", "beautifulsoup4"]
rtd = ["sphinxext-opengraph (>=0.6.3,<0.7.0)", "sphinxcontrib.mermaid (>=0.7.1,<0.8.0)", "sphinxext-rediraffe (>=0.2.7,<0.3.0)", "sphinx-design", "sphinx-book-theme", "ipython"]
linkify = ["linkify-it-py (>=1.0,<2.0)"]
code_style = ["pre-commit (>=2.12,<3.0)"]
[[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]
testing = ["pytest-benchmark", "pytest"]
dev = ["tox", "pre-commit"]
[[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.13.0"
description = "Pygments is a syntax highlighting package written in Python."
category = "main"
optional = true
python-versions = ">=3.6"
[package.extras]
plugins = ["importlib-metadata"]
[[package]]
name = "pyobjc-core"
version = "8.5"
description = "Python<->ObjC Interoperability Module"
category = "main"
optional = false
python-versions = ">=3.6"
[[package]]
name = "pyobjc-framework-cocoa"
version = "8.5"
description = "Wrappers for the Cocoa frameworks on macOS"
category = "main"
optional = false
python-versions = ">=3.6"
[package.dependencies]
pyobjc-core = ">=8.5"
[[package]]
name = "pyobjc-framework-corebluetooth"
version = "8.5"
description = "Wrappers for the framework CoreBluetooth on macOS"
category = "main"
optional = false
python-versions = ">=3.6"
[package.dependencies]
pyobjc-core = ">=8.5"
pyobjc-framework-Cocoa = ">=8.5"
[[package]]
name = "pyobjc-framework-libdispatch"
version = "8.5"
description = "Wrappers for libdispatch on macOS"
category = "main"
optional = false
python-versions = ">=3.6"
[package.dependencies]
pyobjc-core = ">=8.5"
[[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 = ["railroad-diagrams", "jinja2"]
[[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 = ["virtualenv", "pytest-xdist", "six", "process-tests", "hunter", "fields"]
[[package]]
name = "pytz"
version = "2022.2.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 = "sensor-state-data"
version = "2.6.0"
description = "Models for storing and converting Sensor Data state"
category = "main"
optional = false
python-versions = ">=3.9,<4.0"
[package.extras]
docs = ["Sphinx (>=5.0,<6.0)", "myst-parser (>=0.18,<0.19)", "sphinx-rtd-theme (>=1.0,<2.0)"]
[[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.1.1"
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.20"
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 = ["flake8 (>=3.5.0)", "flake8-comprehensions", "flake8-bugbear", "isort", "mypy (>=0.971)", "sphinx-lint", "docutils-stubs", "types-typed-ast", "types-requests"]
test = ["pytest (>=4.6)", "html5lib", "cython", "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]
test = ["pytest"]
lint = ["docutils-stubs", "mypy", "flake8"]
[[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]
test = ["pytest"]
lint = ["docutils-stubs", "mypy", "flake8"]
[[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]
test = ["html5lib", "pytest"]
lint = ["docutils-stubs", "mypy", "flake8"]
[[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 = ["mypy", "flake8", "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]
test = ["pytest"]
lint = ["docutils-stubs", "mypy", "flake8"]
[[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]
test = ["pytest"]
lint = ["docutils-stubs", "mypy", "flake8"]
[[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 = false
python-versions = ">=3.7"
[[package]]
name = "urllib3"
version = "1.26.12"
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 = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"]
secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"]
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 = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"]
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"]
[extras]
docs = ["myst-parser", "Sphinx", "sphinx-rtd-theme"]
[metadata]
lock-version = "1.1"
python-versions = "^3.9"
content-hash = "2967f02eb8a69b3b0e34783091e730aeef6412883fe217cfbde428d90e909ad6"
[metadata.files]
alabaster = []
atomicwrites = []
attrs = []
babel = []
bleak = []
bleak-winrt = []
bluetooth-sensor-state-data = []
certifi = []
charset-normalizer = []
colorama = []
coverage = []
dbus-next = []
docutils = []
home-assistant-bluetooth = []
idna = []
imagesize = []
importlib-metadata = []
iniconfig = []
jinja2 = []
markdown-it-py = []
markupsafe = []
mdit-py-plugins = []
mdurl = []
mypy = []
mypy-extensions = []
myst-parser = []
packaging = []
pluggy = []
py = []
pygments = []
pyobjc-core = []
pyobjc-framework-cocoa = []
pyobjc-framework-corebluetooth = []
pyobjc-framework-libdispatch = []
pyparsing = []
pytest = []
pytest-cov = []
pytz = []
pyyaml = []
requests = []
sensor-state-data = []
snowballstemmer = []
sphinx = []
sphinx-rtd-theme = []
sphinxcontrib-applehelp = []
sphinxcontrib-devhelp = []
sphinxcontrib-htmlhelp = []
sphinxcontrib-jsmath = []
sphinxcontrib-qthelp = []
sphinxcontrib-serializinghtml = []
tomli = []
typing-extensions = []
urllib3 = []
zipp = []
Bluetooth-Devices-tilt-ble-b647228/pyproject.toml 0000664 0000000 0000000 00000004536 14305765043 0021764 0 ustar 00root root 0000000 0000000 [tool.poetry]
name = "tilt-ble"
version = "0.2.3"
description = "Parser for Tilt BLE devices"
authors = ["Alexander Thompson "]
license = "MIT"
readme = "README.md"
repository = "https://github.com/Bluetooth-Devices/tilt-ble"
documentation = "https://tilt-ble.readthedocs.io"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries",
]
packages = [
{ include = "tilt_ble", from = "src" },
]
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/Bluetooth-Devices/tilt-ble/issues"
"Changelog" = "https://github.com/Bluetooth-Devices/tilt-ble/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}
# Source dependencies
home-assistant-bluetooth = ">=1.3.0"
bluetooth-sensor-state-data = ">=1.6.0"
sensor-state-data = ">=2.6.0"
[tool.poetry.extras]
docs = [
"myst-parser",
"sphinx",
"sphinx-rtd-theme",
]
[tool.poetry.dev-dependencies]
pytest = "^7.0"
pytest-cov = "^3.0"
mypy = "^0.971"
[tool.semantic_release]
branch = "main"
version_toml = "pyproject.toml:tool.poetry.version"
version_variable = "src/tilt_ble/__init__.py:__version__"
build_command = "pip install poetry && poetry build"
[tool.pytest.ini_options]
addopts = "-v -Wdefault --cov=tilt_ble --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 = ["tilt_ble", "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"
Bluetooth-Devices-tilt-ble-b647228/renovate.json 0000664 0000000 0000000 00000000101 14305765043 0021546 0 ustar 00root root 0000000 0000000 {
"extends": ["github>browniebroke/renovate-configs:python"]
}
Bluetooth-Devices-tilt-ble-b647228/setup.py 0000664 0000000 0000000 00000000356 14305765043 0020556 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="tilt-ble")
Bluetooth-Devices-tilt-ble-b647228/src/ 0000775 0000000 0000000 00000000000 14305765043 0017627 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/src/tilt_ble/ 0000775 0000000 0000000 00000000000 14305765043 0021425 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/src/tilt_ble/__init__.py 0000664 0000000 0000000 00000000751 14305765043 0023541 0 ustar 00root root 0000000 0000000 """Parser for Inkbird BLE advertisements."""
from __future__ import annotations
from sensor_state_data import (
DeviceClass,
DeviceKey,
SensorDescription,
SensorDeviceInfo,
SensorUpdate,
SensorValue,
Units,
)
from .parser import TiltBluetoothDeviceData
__version__ = "0.2.3"
__all__ = [
"DeviceClass",
"DeviceKey",
"SensorDescription",
"SensorDeviceInfo",
"SensorUpdate",
"SensorValue",
"TiltBluetoothDeviceData",
"Units",
]
Bluetooth-Devices-tilt-ble-b647228/src/tilt_ble/parser.py 0000664 0000000 0000000 00000005577 14305765043 0023311 0 ustar 00root root 0000000 0000000 import logging
from struct import unpack
from typing import Final
from bluetooth_sensor_state_data import BluetoothData
from home_assistant_bluetooth import BluetoothServiceInfo
from sensor_state_data import DeviceClass, Units
_LOGGER = logging.getLogger(__name__)
_UUID_TO_COLOR: Final = {
0xA495BB10C5B14B44B5121370F02D74DE: "Red",
0xA495BB20C5B14B44B5121370F02D74DE: "Green",
0xA495BB30C5B14B44B5121370F02D74DE: "Black",
0xA495BB40C5B14B44B5121370F02D74DE: "Purple",
0xA495BB50C5B14B44B5121370F02D74DE: "Orange",
0xA495BB60C5B14B44B5121370F02D74DE: "Blue",
0xA495BB70C5B14B44B5121370F02D74DE: "Yellow",
0xA495BB80C5B14B44B5121370F02D74DE: "Pink",
}
class TiltBluetoothDeviceData(BluetoothData):
"""Data update for Tilt Bluetooth devices"""
def _start_update(self, service_info: BluetoothServiceInfo) -> None:
"""Update from BLE advertisement data."""
_LOGGER.debug("Parsing Tilt BLE advertisement data: %s", service_info)
manufacturer_data = service_info.manufacturer_data
if not manufacturer_data:
return
try:
data = manufacturer_data[76]
except KeyError:
_LOGGER.debug("Manufacturer ID 76 not found in data")
return
if data[0] != 0x02 or data[1] != 0x15:
_LOGGER.debug("Wrong subtype or subtype length for Tilt iBeacon")
return
uuid = int.from_bytes(data[2:18], byteorder="big")
try:
color = _UUID_TO_COLOR[uuid]
except KeyError:
_LOGGER.debug("Not a Tilt iBeacon UUID")
return
self.set_device_manufacturer("Tilt")
self.set_device_type(color)
self.set_device_name(f"Tilt {color}")
(major, minor, power) = unpack(">hhb", data[18:23])
changed_manufacturer_data = self.changed_manufacturer_data(service_info)
if not changed_manufacturer_data:
return
temperature = major
specific_gravity = minor / 1000
_LOGGER.debug(
"Tilt %s data: temp=%.2f, gravity=%.2f, power=%.2f",
color,
temperature,
specific_gravity,
power,
)
self.update_sensor(
key=DeviceClass.TEMPERATURE,
device_class=DeviceClass.TEMPERATURE,
native_unit_of_measurement=Units.TEMP_FAHRENHEIT,
native_value=temperature,
)
self.update_sensor(
key=DeviceClass.SPECIFIC_GRAVITY,
device_class=DeviceClass.SPECIFIC_GRAVITY,
native_unit_of_measurement=Units.SPECIFIC_GRAVITY,
native_value=specific_gravity,
)
self.update_sensor(
key=DeviceClass.SIGNAL_STRENGTH,
device_class=DeviceClass.SIGNAL_STRENGTH,
native_unit_of_measurement=Units.SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
native_value=power,
)
Bluetooth-Devices-tilt-ble-b647228/src/tilt_ble/py.typed 0000664 0000000 0000000 00000000000 14305765043 0023112 0 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/tests/ 0000775 0000000 0000000 00000000000 14305765043 0020202 5 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/tests/__init__.py 0000664 0000000 0000000 00000000000 14305765043 0022301 0 ustar 00root root 0000000 0000000 Bluetooth-Devices-tilt-ble-b647228/tests/test_parser.py 0000664 0000000 0000000 00000005311 14305765043 0023107 0 ustar 00root root 0000000 0000000 from home_assistant_bluetooth import BluetoothServiceInfo
from sensor_state_data import (
DeviceClass,
DeviceKey,
SensorDescription,
SensorDeviceInfo,
SensorUpdate,
SensorValue,
Units,
)
from tilt_ble.parser import TiltBluetoothDeviceData
def test_can_create():
TiltBluetoothDeviceData()
def test_sps():
parser = TiltBluetoothDeviceData()
service_info = BluetoothServiceInfo(
name="aa-bb-cc-dd-ee-ff",
manufacturer_data={
76: b"\x02\x15\xa4\x95\xbb \xc5\xb1KD\xb5\x12\x13p\xf0-t\xde\x00@\x04\x1cP"
},
service_uuids=[],
address="aa:bb:cc:dd:ee:ff",
rssi=-60,
service_data={},
source="local",
)
result = parser.update(service_info)
assert result == SensorUpdate(
title=None,
devices={
None: SensorDeviceInfo(
name="Tilt Green",
model="Green",
manufacturer="Tilt",
sw_version=None,
hw_version=None,
)
},
entity_descriptions={
DeviceKey(key="signal_strength", device_id=None): SensorDescription(
device_key=DeviceKey(key="signal_strength", device_id=None),
device_class=DeviceClass.SIGNAL_STRENGTH,
native_unit_of_measurement=Units.SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
),
DeviceKey(key="specific_gravity", device_id=None): SensorDescription(
device_key=DeviceKey(key="specific_gravity", device_id=None),
device_class=DeviceClass.SPECIFIC_GRAVITY,
native_unit_of_measurement=Units.SPECIFIC_GRAVITY,
),
DeviceKey(key="temperature", device_id=None): SensorDescription(
device_key=DeviceKey(key="temperature", device_id=None),
device_class=DeviceClass.TEMPERATURE,
native_unit_of_measurement=Units.TEMP_FAHRENHEIT,
),
},
entity_values={
DeviceKey(key="signal_strength", device_id=None): SensorValue(
device_key=DeviceKey(key="signal_strength", device_id=None),
name="Signal Strength",
native_value=-60,
),
DeviceKey(key="specific_gravity", device_id=None): SensorValue(
device_key=DeviceKey(key="specific_gravity", device_id=None),
name="Specific Gravity",
native_value=1.052,
),
DeviceKey(key="temperature", device_id=None): SensorValue(
device_key=DeviceKey(key="temperature", device_id=None),
name="Temperature",
native_value=64,
),
},
)