diff --git a/INFO.md b/INFO.md new file mode 100644 index 0000000..971c75f --- /dev/null +++ b/INFO.md @@ -0,0 +1,37 @@ +## zaptec charger custom component for home assistant + +[![GitHub Release][releases-shield]][releases] +[![GitHub Activity][commits-shield]][commits] +[![License][license-shield]][license] + +[![hacs][hacsbadge]][hacs] +[![Project Maintenance][maintenance-shield]][user_profile] +[![BuyMeCoffee][buymecoffeebadge]][buymecoffee] + +[![Discord][discord-shield]][discord] +[![Community Forum][forum-shield]][forum] + +### Usage +Use hacs to install the package, add the config example for more usage see the `lovelace_example` + +Setup the integration using the integrations page. + + +[zaptec]: https://github.com/custom-components/zaptec +[buymecoffee]: https://www.buymeacoffee.com/hellowlol1 +[buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge +[commits-shield]: https://img.shields.io/github/commit-activity/y/custom-components/zaptec.svg?style=for-the-badge +[commits]: https://github.com/custom-components/zaptec/commits/master +[hacs]: https://hacs.xyz +[hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge +[discord]: https://discord.gg/Qa5fW2R +[discord-shield]: https://img.shields.io/discord/330944238910963714.svg?style=for-the-badge +[exampleimg]: example.png +[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge +[forum]: https://community.home-assistant.io/ +[license]: https://github.com/custom-components/zaptec/blob/main/LICENSE +[license-shield]: https://img.shields.io/github/license/custom-components/zaptec.svg?style=for-the-badge +[maintenance-shield]: https://img.shields.io/badge/maintainer-Joakim%20Sørensen%20%40ludeeus-blue.svg?style=for-the-badge +[releases-shield]: https://img.shields.io/github/release/custom-components/integration_blueprint.svg?style=for-the-badge +[releases]: https://github.com/custom-components/zaptec/releases +[user_profile]: https://github.com/hellowlol \ No newline at end of file diff --git a/README.md b/README.md index ccce9cf..971c75f 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,37 @@ ## zaptec charger custom component for home assistant +[![GitHub Release][releases-shield]][releases] +[![GitHub Activity][commits-shield]][commits] +[![License][license-shield]][license] + +[![hacs][hacsbadge]][hacs] +[![Project Maintenance][maintenance-shield]][user_profile] +[![BuyMeCoffee][buymecoffeebadge]][buymecoffee] + +[![Discord][discord-shield]][discord] +[![Community Forum][forum-shield]][forum] + ### Usage Use hacs to install the package, add the config example for more usage see the `lovelace_example` -Config examples -``` -zaptec: - username: your_username - password: your_password - sensor: - wanted_attributes: - - -2 - - 201 - - 202 - - 270 - - 501 - - 507 - - 513 - - 553 - - 708 - - 710 - - 804 - - 809 - - 911 - switch: -``` +Setup the integration using the integrations page. + + +[zaptec]: https://github.com/custom-components/zaptec +[buymecoffee]: https://www.buymeacoffee.com/hellowlol1 +[buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge +[commits-shield]: https://img.shields.io/github/commit-activity/y/custom-components/zaptec.svg?style=for-the-badge +[commits]: https://github.com/custom-components/zaptec/commits/master +[hacs]: https://hacs.xyz +[hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge +[discord]: https://discord.gg/Qa5fW2R +[discord-shield]: https://img.shields.io/discord/330944238910963714.svg?style=for-the-badge +[exampleimg]: example.png +[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge +[forum]: https://community.home-assistant.io/ +[license]: https://github.com/custom-components/zaptec/blob/main/LICENSE +[license-shield]: https://img.shields.io/github/license/custom-components/zaptec.svg?style=for-the-badge +[maintenance-shield]: https://img.shields.io/badge/maintainer-Joakim%20Sørensen%20%40ludeeus-blue.svg?style=for-the-badge +[releases-shield]: https://img.shields.io/github/release/custom-components/integration_blueprint.svg?style=for-the-badge +[releases]: https://github.com/custom-components/zaptec/releases +[user_profile]: https://github.com/hellowlol \ No newline at end of file diff --git a/custom_components/zaptec/api.py b/custom_components/zaptec/api.py index ebae3c9..d3627bc 100644 --- a/custom_components/zaptec/api.py +++ b/custom_components/zaptec/api.py @@ -54,7 +54,6 @@ class AuthorizationFailedException(Exception): pass - # should be a static method of account async def _update_remaps() -> None: wanted = ["Observations"] @@ -358,7 +357,6 @@ async def check_login(username, password): return False - async def _refresh_token(self): # So for some reason they used grant_type password.. # what the point with oauth then? Anyway this is valid for 24 hour