Skip to content

Commit 0c6214c

Browse files
committed
Development environment
1 parent c1204f0 commit 0c6214c

File tree

5 files changed

+426
-0
lines changed

5 files changed

+426
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea/
22
.DS_Store
33
__pycache__/
4+
.venv/

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13.2

DEVELOP.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Developing `connectlife-ha`
2+
3+
## Prerequisites
4+
5+
1. `uv`: https://docs.astral.sh/uv/getting-started/installation/
6+
2. Home Assistant development environment: https://developers.home-assistant.io/docs/development_environment
7+
8+
Install the custom component in your Home Assistant development environment
9+
(assuming your configuration directory is `config`):
10+
```bash
11+
home_assistant_repo=<local home-assistant repo>
12+
connectlife_ha_repo=<local connectlife-ha repo>
13+
cd ${home_assistant_repo}
14+
mkdir -p config/custom_components
15+
cd config/custom_components
16+
ln -s ${connectlife_ha_repo}>/custom_componnents/connectlife .
17+
```
18+
19+
Install dev dependencies (in `connectlife-ha` repo):
20+
```bash
21+
uv sync
22+
```
23+
24+
## Generate `strings.json`
25+
26+
This will add strings for new properties.
27+
28+
```bash
29+
uv run python -m scripts.gen_strings
30+
```
31+
32+
## Validate mapping files
33+
34+
```bash
35+
uv run python -m scripts.validate_mappings
36+
```

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[project]
2+
name = "connectlife-ha"
3+
version = "0.25.0"
4+
description = "Custom Home Assistant component for ConnectLife devices"
5+
readme = "README.md"
6+
requires-python = ">=3.13.2"
7+
dependencies = [
8+
"connectlife==0.5.4",
9+
]
10+
11+
[dependency-groups]
12+
dev = [
13+
"jschon==0.11.1",
14+
"pyyaml>=6.0.3",
15+
]

0 commit comments

Comments
 (0)