Skip to content

Commit

Permalink
Merge pull request #56 from sveinse/feature-refactor
Browse files Browse the repository at this point in the history
Major refactor of the component. Using entities and devices + many other improvements and fixes
  • Loading branch information
sveinse authored Nov 11, 2023
2 parents c1c5699 + 167847d commit a20ef04
Show file tree
Hide file tree
Showing 45 changed files with 3,574 additions and 3,042 deletions.
54 changes: 54 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "Zaptec integration development",
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.11-bullseye",
"postCreateCommand": "scripts/setup",
"forwardPorts": [
8123
],
"portsAttributes": {
"8123": {
"label": "Home Assistant",
"onAutoForward": "notify"
},
"0-8122": {
"label": "Auto-Forwarded - Other",
"onAutoForward": "ignore"
},
"8124-999999": {
"label": "Auto-Forwarded - Other",
"onAutoForward": "ignore"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"github.vscode-pull-request-github",
"ryanluker.vscode-coverage-gutters",
"ms-python.vscode-pylance",
"visualstudioexptteam.vscodeintellicode",
"redhat.vscode-yaml",
"esbenp.prettier-vscode"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.pythonPath": "/usr/local/python/bin/python",
"python.analysis.autoSearchPaths": false,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
},
"remoteUser": "vscode",
"features": {
"rust": "latest"
}
}
60 changes: 0 additions & 60 deletions .devcontainer/README.md

This file was deleted.

30 changes: 0 additions & 30 deletions .devcontainer/devcontainer.json

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ $RECYCLE.BIN/
# =========================

__pycache__

# Python virtual environments
venv*

# Home Assistant configuration
config/*
!config/configuration.yaml
35 changes: 0 additions & 35 deletions .vscode/launch.json

This file was deleted.

12 changes: 0 additions & 12 deletions .vscode/settings.json

This file was deleted.

24 changes: 3 additions & 21 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,10 @@
"version": "2.0.0",
"tasks": [
{
"label": "Run Home Assistant on port 9123",
"label": "Run Home Assistant on port 8123",
"type": "shell",
"command": "container start",
"problemMatcher": []
},
{
"label": "Run Home Assistant configuration against /config",
"type": "shell",
"command": "container check",
"problemMatcher": []
},
{
"label": "Upgrade Home Assistant to latest dev",
"type": "shell",
"command": "container install",
"problemMatcher": []
},
{
"label": "Install a specific version of Home Assistant",
"type": "shell",
"command": "container set-version",
"command": "scripts/develop",
"problemMatcher": []
}
]
}
}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

## 0.7.0

Major refactor of the component
* Objective: Update the component to the "HA way" using devices and entities
* Zaptec devices (installation, circuit and charger) use name set in Zaptec portal
* Added entities for each device. No need for using attrs and templates.
* Added support for selecting which chargers to add to zaptec
* Added support for adding an optional prefix to the device names
* Fixed adjustable charging currents, all or individual three phase.
* Added support for authorization and deauthorization of charging using the
Zaptec internal *native* authentication
* Zaptec produces energy sensors that can be used with HA energy dashboard
* Refactor services in order to make them easier to use with the service call UIs
* Hardnened the cloud connection robustness (better timeout, better data and
error handling)
* Use data update coordinator for polling entities
* Added "Download diagnostics"
* Bugfixes and documentation update
37 changes: 0 additions & 37 deletions INFO.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Hellowlol and contributers
Copyright (c) 2023 Hellowlol, Svein Seldal and contributers

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

0 comments on commit a20ef04

Please sign in to comment.