Skip to content

Commit a20ef04

Browse files
authored
Merge pull request #56 from sveinse/feature-refactor
Major refactor of the component. Using entities and devices + many other improvements and fixes
2 parents c1c5699 + 167847d commit a20ef04

Some content is hidden

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

45 files changed

+3574
-3042
lines changed

.devcontainer.json

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "Zaptec integration development",
3+
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.11-bullseye",
4+
"postCreateCommand": "scripts/setup",
5+
"forwardPorts": [
6+
8123
7+
],
8+
"portsAttributes": {
9+
"8123": {
10+
"label": "Home Assistant",
11+
"onAutoForward": "notify"
12+
},
13+
"0-8122": {
14+
"label": "Auto-Forwarded - Other",
15+
"onAutoForward": "ignore"
16+
},
17+
"8124-999999": {
18+
"label": "Auto-Forwarded - Other",
19+
"onAutoForward": "ignore"
20+
}
21+
},
22+
"customizations": {
23+
"vscode": {
24+
"extensions": [
25+
"ms-python.python",
26+
"github.vscode-pull-request-github",
27+
"ryanluker.vscode-coverage-gutters",
28+
"ms-python.vscode-pylance",
29+
"visualstudioexptteam.vscodeintellicode",
30+
"redhat.vscode-yaml",
31+
"esbenp.prettier-vscode"
32+
],
33+
"settings": {
34+
"files.eol": "\n",
35+
"editor.tabSize": 4,
36+
"python.defaultInterpreterPath": "/usr/local/bin/python",
37+
"python.pythonPath": "/usr/local/python/bin/python",
38+
"python.analysis.autoSearchPaths": false,
39+
"python.linting.pylintEnabled": true,
40+
"python.linting.enabled": true,
41+
"python.formatting.provider": "black",
42+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
43+
"editor.formatOnPaste": false,
44+
"editor.formatOnSave": true,
45+
"editor.formatOnType": true,
46+
"files.trimTrailingWhitespace": true
47+
}
48+
}
49+
},
50+
"remoteUser": "vscode",
51+
"features": {
52+
"rust": "latest"
53+
}
54+
}

.devcontainer/README.md

-60
This file was deleted.

.devcontainer/devcontainer.json

-30
This file was deleted.

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ $RECYCLE.BIN/
2323
# =========================
2424

2525
__pycache__
26+
27+
# Python virtual environments
28+
venv*
29+
30+
# Home Assistant configuration
31+
config/*
32+
!config/configuration.yaml

.vscode/launch.json

-35
This file was deleted.

.vscode/settings.json

-12
This file was deleted.

.vscode/tasks.json

+3-21
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,10 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"label": "Run Home Assistant on port 9123",
5+
"label": "Run Home Assistant on port 8123",
66
"type": "shell",
7-
"command": "container start",
8-
"problemMatcher": []
9-
},
10-
{
11-
"label": "Run Home Assistant configuration against /config",
12-
"type": "shell",
13-
"command": "container check",
14-
"problemMatcher": []
15-
},
16-
{
17-
"label": "Upgrade Home Assistant to latest dev",
18-
"type": "shell",
19-
"command": "container install",
20-
"problemMatcher": []
21-
},
22-
{
23-
"label": "Install a specific version of Home Assistant",
24-
"type": "shell",
25-
"command": "container set-version",
7+
"command": "scripts/develop",
268
"problemMatcher": []
279
}
2810
]
29-
}
11+
}

CHANGELOG.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
3+
## 0.7.0
4+
5+
Major refactor of the component
6+
* Objective: Update the component to the "HA way" using devices and entities
7+
* Zaptec devices (installation, circuit and charger) use name set in Zaptec portal
8+
* Added entities for each device. No need for using attrs and templates.
9+
* Added support for selecting which chargers to add to zaptec
10+
* Added support for adding an optional prefix to the device names
11+
* Fixed adjustable charging currents, all or individual three phase.
12+
* Added support for authorization and deauthorization of charging using the
13+
Zaptec internal *native* authentication
14+
* Zaptec produces energy sensors that can be used with HA energy dashboard
15+
* Refactor services in order to make them easier to use with the service call UIs
16+
* Hardnened the cloud connection robustness (better timeout, better data and
17+
error handling)
18+
* Use data update coordinator for polling entities
19+
* Added "Download diagnostics"
20+
* Bugfixes and documentation update

INFO.md

-37
This file was deleted.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Hellowlol and contributers
3+
Copyright (c) 2023 Hellowlol, Svein Seldal and contributers
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)