Skip to content

Commit e9e8a5a

Browse files
authored
Merge pull request #381 from flixlix/refactor-states
refactor: ♻️ restructure code
2 parents 7db4bc9 + 47297ff commit e9e8a5a

File tree

109 files changed

+16937
-8165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+16937
-8165
lines changed

.devcontainer/devcontainer.json

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
1-
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
21
{
3-
"name": "Homekit Button Development",
4-
"image": "ghcr.io/ludeeus/devcontainer/generic:latest",
5-
"context": "..",
6-
"remoteUser": "vscode",
7-
"appPort": ["5000:5000", "9123:8123"],
8-
"postCreateCommand": "yarn install && sudo container install",
9-
"runArgs": ["-v", "${localWorkspaceFolder}/.devcontainer/www:/config/www"],
10-
"extensions": [
11-
"github.vscode-pull-request-github",
12-
"eamodio.gitlens",
13-
"dbaeumer.vscode-eslint",
14-
"esbenp.prettier-vscode",
15-
"bierner.lit-html",
16-
"runem.lit-plugin",
17-
"davidanson.vscode-markdownlint",
18-
"redhat.vscode-yaml",
19-
"msjsdiag.debugger-for-chrome",
20-
"yzhang.markdown-all-in-one"
2+
"name": "flixlix/power-flow-card-plus",
3+
"image": "nikolaik/python-nodejs",
4+
"postCreateCommand": "scripts/setup",
5+
"forwardPorts": [
6+
8123
217
],
22-
"settings": {
23-
"files.eol": "\n",
24-
"editor.tabSize": 2,
25-
"terminal.integrated.shell.linux": "/bin/bash",
26-
"editor.formatOnPaste": false,
27-
"editor.formatOnSave": true,
28-
"editor.formatOnType": true,
29-
"files.trimTrailingWhitespace": true,
30-
"editor.defaultFormatter": "esbenp.prettier-vscode",
31-
"markdown.extension.toc.githubCompatibility": true,
32-
"files.watcherExclude": {
33-
"**/.git/objects/**": true,
34-
"**/.git/subtree-cache/**": true,
35-
"**/node_modules/**": true,
36-
"**/.hg/store/**": true,
37-
"**/.rpt2_cache/**": true
8+
"portsAttributes": {
9+
"8123": {
10+
"label": "Home Assistant",
11+
"onAutoForward": "notify"
12+
}
13+
},
14+
"customizations": {
15+
"vscode": {
16+
"extensions": [
17+
"ms-python.python",
18+
"github.vscode-pull-request-github",
19+
"ryanluker.vscode-coverage-gutters",
20+
"ms-python.vscode-pylance"
21+
],
22+
"settings": {
23+
"files.eol": "\n",
24+
"editor.tabSize": 4,
25+
"python.pythonPath": "/usr/bin/python3",
26+
"python.analysis.autoSearchPaths": false,
27+
"python.linting.pylintEnabled": true,
28+
"python.linting.enabled": true,
29+
"python.formatting.provider": "black",
30+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
31+
"editor.formatOnPaste": false,
32+
"editor.formatOnSave": true,
33+
"editor.formatOnType": true,
34+
"files.trimTrailingWhitespace": true
35+
}
3836
}
37+
},
38+
"remoteUser": "vscode",
39+
"features": {
40+
"ghcr.io/devcontainers/features/rust:1": {}
3941
}
40-
}
42+
}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ _site/
2727

2828
storybook-static
2929
custom-elements.json
30-
package-lock.json
3130
pnpm-lock.yaml

README.md

Lines changed: 155 additions & 161 deletions
Large diffs are not rendered by default.

config/.HA_VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023.8.0
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"version": 1,
3+
"minor_version": 1,
4+
"key": "assist_pipeline.pipelines",
5+
"data": {
6+
"items": [
7+
{
8+
"conversation_engine": "homeassistant",
9+
"conversation_language": "de",
10+
"id": "01hk9y6t5qnrs2dkdd7b8y6h0q",
11+
"language": "de",
12+
"name": "Home Assistant",
13+
"stt_engine": null,
14+
"stt_language": null,
15+
"tts_engine": null,
16+
"tts_language": null,
17+
"tts_voice": null
18+
}
19+
],
20+
"preferred_item": "01hk9y6t5qnrs2dkdd7b8y6h0q"
21+
}
22+
}

config/.storage/auth

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
{
2+
"version": 1,
3+
"minor_version": 1,
4+
"key": "auth",
5+
"data": {
6+
"users": [
7+
{
8+
"id": "24cab0d31ffd4cff8ed6995e6a12ae10",
9+
"group_ids": [
10+
"system-read-only"
11+
],
12+
"is_owner": false,
13+
"is_active": true,
14+
"name": "Home Assistant Content",
15+
"system_generated": true,
16+
"local_only": false
17+
},
18+
{
19+
"id": "4332014890bc4a0695f82506bf9dfac2",
20+
"group_ids": [
21+
"system-admin"
22+
],
23+
"is_owner": true,
24+
"is_active": true,
25+
"name": "test",
26+
"system_generated": false,
27+
"local_only": false
28+
}
29+
],
30+
"groups": [
31+
{
32+
"id": "system-admin",
33+
"name": "Administrators"
34+
},
35+
{
36+
"id": "system-users",
37+
"name": "Users"
38+
},
39+
{
40+
"id": "system-read-only",
41+
"name": "Read Only"
42+
}
43+
],
44+
"credentials": [
45+
{
46+
"id": "5f9f859d87af41aa806d40bcbb211541",
47+
"user_id": "4332014890bc4a0695f82506bf9dfac2",
48+
"auth_provider_type": "homeassistant",
49+
"auth_provider_id": null,
50+
"data": {
51+
"username": "test"
52+
}
53+
}
54+
],
55+
"refresh_tokens": [
56+
{
57+
"id": "d052d99a0f684ad39d1ed345f26d7499",
58+
"user_id": "24cab0d31ffd4cff8ed6995e6a12ae10",
59+
"client_id": null,
60+
"client_name": null,
61+
"client_icon": null,
62+
"token_type": "system",
63+
"created_at": "2024-01-04T09:49:54.562090+00:00",
64+
"access_token_expiration": 1800.0,
65+
"token": "e31a536dae98988d3276ec678287103f5262de162896f1a708a50647b042518d7a89e82e6ed36ee915092f31ef9202a1bf8fdd92e4f865ff390e7407e2bfdce1",
66+
"jwt_key": "268d8a4672764a219c7bbc5c0015b7f07f128c5f0252fa5aa29e6fbf6b29f52780ab2baa59f78b00754a77ec3c69263c3bda6c469c2af061b9d4d8df41ff8cc7",
67+
"last_used_at": null,
68+
"last_used_ip": null,
69+
"credential_id": null,
70+
"version": "2023.8.0"
71+
},
72+
{
73+
"id": "37f2286e29ee4ad1befb0249921c13a5",
74+
"user_id": "4332014890bc4a0695f82506bf9dfac2",
75+
"client_id": "http://localhost:8123/",
76+
"client_name": null,
77+
"client_icon": null,
78+
"token_type": "normal",
79+
"created_at": "2024-01-04T09:50:54.669577+00:00",
80+
"access_token_expiration": 1800.0,
81+
"token": "3d28c0e53a5543e65b522b6f9364c89b4471439adbd126679c3810a8a589f4c21ef6e3f83cb97324a3de01256ee57ce07ce885be3dd437f1558dfa5171fb5cb9",
82+
"jwt_key": "07d08b02602242fd3c1d6af1a39865028f44112eaf6d8870e3fc36569e7762116e5fdda7dae8c2776a58a15e89c20c004489f9ee0795da459e6779e4d0f350bf",
83+
"last_used_at": "2024-01-04T09:50:54.670126+00:00",
84+
"last_used_ip": "127.0.0.1",
85+
"credential_id": "5f9f859d87af41aa806d40bcbb211541",
86+
"version": "2023.8.0"
87+
},
88+
{
89+
"id": "12767b361ea94c4caecfb2e6155b55dc",
90+
"user_id": "4332014890bc4a0695f82506bf9dfac2",
91+
"client_id": "http://localhost:8123/",
92+
"client_name": null,
93+
"client_icon": null,
94+
"token_type": "normal",
95+
"created_at": "2024-01-04T09:51:16.891109+00:00",
96+
"access_token_expiration": 1800.0,
97+
"token": "06feefa3d4dbcf63964405a6374d02cf0b76a42741c2a5933cf559f75a2b76be5cb130536d45d69367b96ba1e94df8adde699cf12db47e67037065be1e2ea273",
98+
"jwt_key": "60b6aa3f49c77cded0081aa4a53106c5b3d07b0cc01c5573705238056458d09651e0c4a0369189f08181c4ba86a5ca6c09225e4351de9a228d895e7eecaef63a",
99+
"last_used_at": "2024-01-04T09:51:16.891691+00:00",
100+
"last_used_ip": "127.0.0.1",
101+
"credential_id": "5f9f859d87af41aa806d40bcbb211541",
102+
"version": "2023.8.0"
103+
},
104+
{
105+
"id": "2024d07915ca4fb1a0fc26cf7f9d9c6f",
106+
"user_id": "4332014890bc4a0695f82506bf9dfac2",
107+
"client_id": "http://localhost:8123/",
108+
"client_name": null,
109+
"client_icon": null,
110+
"token_type": "normal",
111+
"created_at": "2024-01-04T09:52:26.816463+00:00",
112+
"access_token_expiration": 1800.0,
113+
"token": "68cddfde5e5ca75090a636bec396b484fb70faf1d476236ed6a42003b522a1db538d9ac6a479e947d9aece82677d3af218d353284fd53f4c50c8071b4d02b448",
114+
"jwt_key": "0e1812da44035cd15cd62b802f1dfdbd66193d7942ab09aabe250b05c63d06bad9669766031eea294560c366c2ad7183f1846bf325fea16df981893a245956ef",
115+
"last_used_at": "2024-01-04T09:52:26.818466+00:00",
116+
"last_used_ip": "127.0.0.1",
117+
"credential_id": "5f9f859d87af41aa806d40bcbb211541",
118+
"version": "2023.8.0"
119+
}
120+
]
121+
}
122+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 1,
3+
"minor_version": 1,
4+
"key": "auth_provider.homeassistant",
5+
"data": {
6+
"users": [
7+
{
8+
"username": "test",
9+
"password": "JDJiJDEyJHBtUVM0OS5HclVkd004MG9QZ0o4ZWVQLkJLQ3BGbmFmVFhhOEVoOGhmVDZsV3BMN29sN1RT"
10+
}
11+
]
12+
}
13+
}

config/.storage/core.analytics

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": 1,
3+
"minor_version": 1,
4+
"key": "core.analytics",
5+
"data": {
6+
"onboarded": true,
7+
"preferences": {},
8+
"uuid": null
9+
}
10+
}

config/.storage/core.area_registry

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"version": 1,
3+
"minor_version": 3,
4+
"key": "core.area_registry",
5+
"data": {
6+
"areas": [
7+
{
8+
"aliases": [],
9+
"name": "Wohnzimmer",
10+
"id": "wohnzimmer",
11+
"picture": null
12+
},
13+
{
14+
"aliases": [],
15+
"name": "Küche",
16+
"id": "kuche",
17+
"picture": null
18+
},
19+
{
20+
"aliases": [],
21+
"name": "Schlafzimmer",
22+
"id": "schlafzimmer",
23+
"picture": null
24+
}
25+
]
26+
}
27+
}

config/.storage/core.config

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": 1,
3+
"minor_version": 3,
4+
"key": "core.config",
5+
"data": {
6+
"latitude": 52.3769091109999,
7+
"longitude": 4.896898119902229,
8+
"elevation": 0,
9+
"unit_system_v2": "metric",
10+
"location_name": "Home",
11+
"time_zone": "Europe/Berlin",
12+
"external_url": null,
13+
"internal_url": null,
14+
"currency": "EUR",
15+
"country": "DE",
16+
"language": "de"
17+
}
18+
}

0 commit comments

Comments
 (0)