diff --git a/.devcontainer.json b/.devcontainer.json index 9a91ab6..6f83273 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -1,5 +1,5 @@ { - "name": "ludeeus/integration_blueprint", + "name": "toggm/askoheat", "image": "mcr.microsoft.com/devcontainers/python:3.12", "postCreateCommand": "scripts/setup", "forwardPorts": [ diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 92fe7a5..9b2cc4e 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -22,7 +22,7 @@ body: required: true - label: This issue only contains 1 issue (if you have multiple issues, open one issue for each issue). required: true - - label: This issue is not a duplicate issue of any [previous issues](https://github.com/ludeeus/integration_blueprint/issues?q=is%3Aissue+label%3A%22Bug%22+).. + - label: This issue is not a duplicate issue of any [previous issues](https://github.com/toggm/askoheat/issues?q=is%3Aissue+label%3A%22Bug%22+).. required: true - type: textarea attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 433467b..aea9a90 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -14,7 +14,7 @@ body: required: true - label: This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request). required: true - - label: This issue is not a duplicate feature request of [previous feature requests](https://github.com/ludeeus/integration_blueprint/issues?q=is%3Aissue+label%3A%22Feature+Request%22+). + - label: This issue is not a duplicate feature request of [previous feature requests](https://github.com/toggm/askoheat/issues?q=is%3Aissue+label%3A%22Feature+Request%22+). required: true - type: textarea diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a140941..96c48c0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,10 +20,10 @@ jobs: - name: "ZIP the integration directory" shell: "bash" run: | - cd "${{ github.workspace }}/custom_components/integration_blueprint" - zip integration_blueprint.zip -r ./ + cd "${{ github.workspace }}/custom_components/askoheat" + zip askoheat.zip -r ./ - name: "Upload the ZIP file to the release" uses: "softprops/action-gh-release@v2.0.8" with: - files: ${{ github.workspace }}/custom_components/integration_blueprint/integration_blueprint.zip + files: ${{ github.workspace }}/custom_components/askoheat/askoheat.zip diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 88f2fa7..8dba12e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,7 @@ Use [black](https://github.com/ambv/black) to make sure the code follows the sty ## Test your code modification -This custom component is based on [integration_blueprint template](https://github.com/ludeeus/integration_blueprint). +This custom component is based on [askoheat template](https://github.com/ludeeus/askoheat). It comes with development environment in a container, easy to launch if you use Visual Studio Code. With this container you will have a stand alone diff --git a/LICENSE b/LICENSE index 8f7c6c8..797cc48 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 - 2024 Joakim Sørensen @ludeeus +Copyright (c) 2025 Mike Toggweiler @toggm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README_EXAMPLE.md b/README_EXAMPLE.md index e6fe2c5..1f7fe7a 100644 --- a/README_EXAMPLE.md +++ b/README_EXAMPLE.md @@ -10,7 +10,7 @@ [![Discord][discord-shield]][discord] [![Community Forum][forum-shield]][forum] -_Integration to integrate with [integration_blueprint][integration_blueprint]._ +_Integration to integrate with [askoheat][askoheat]._ **This integration will set up the following platforms.** @@ -24,8 +24,8 @@ Platform | Description 1. Using the tool of choice open the directory (folder) for your HA configuration (where you find `configuration.yaml`). 1. If you do not have a `custom_components` directory (folder) there, you need to create it. -1. In the `custom_components` directory (folder) create a new folder called `integration_blueprint`. -1. Download _all_ the files from the `custom_components/integration_blueprint/` directory (folder) in this repository. +1. In the `custom_components` directory (folder) create a new folder called `askoheat`. +1. Download _all_ the files from the `custom_components/askoheat/` directory (folder) in this repository. 1. Place the files you downloaded in the new directory (folder) you created. 1. Restart Home Assistant 1. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Integration blueprint" @@ -40,17 +40,15 @@ If you want to contribute to this please read the [Contribution guidelines](CONT *** -[integration_blueprint]: https://github.com/ludeeus/integration_blueprint -[buymecoffee]: https://www.buymeacoffee.com/ludeeus +[askoheat]: https://github.com/toggm/askoheat +[buymecoffee]: https://www.buymeacoffee.com/toggm [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/ludeeus/integration_blueprint.svg?style=for-the-badge -[commits]: https://github.com/ludeeus/integration_blueprint/commits/main -[discord]: https://discord.gg/Qa5fW2R -[discord-shield]: https://img.shields.io/discord/330944238910963714.svg?style=for-the-badge +[commits-shield]: https://img.shields.io/github/commit-activity/y/toggm/askoheat.svg?style=for-the-badge +[commits]: https://github.com/ludeeus/askoheat/commits/main [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-shield]: https://img.shields.io/github/license/ludeeus/integration_blueprint.svg?style=for-the-badge +[license-shield]: https://img.shields.io/github/license/toggm/askoheat.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/ludeeus/integration_blueprint.svg?style=for-the-badge -[releases]: https://github.com/ludeeus/integration_blueprint/releases +[releases-shield]: https://img.shields.io/github/release/ludeeus/askoheat.svg?style=for-the-badge +[releases]: https://github.com/ludeeus/askoheat/releases diff --git a/config/configuration.yaml b/config/configuration.yaml index ccc8410..17acd8b 100644 --- a/config/configuration.yaml +++ b/config/configuration.yaml @@ -9,4 +9,4 @@ homeassistant: logger: default: info logs: - custom_components.integration_blueprint: debug + custom_components.askoheat: debug diff --git a/custom_components/integration_blueprint/__init__.py b/custom_components/askoheat/__init__.py similarity index 94% rename from custom_components/integration_blueprint/__init__.py rename to custom_components/askoheat/__init__.py index 7e79eca..4ab59e5 100644 --- a/custom_components/integration_blueprint/__init__.py +++ b/custom_components/askoheat/__init__.py @@ -1,8 +1,8 @@ """ -Custom integration to integrate integration_blueprint with Home Assistant. +Custom integration to integrate askoheat+ hot water heating with Home Assistant. For more details about this integration, please refer to -https://github.com/ludeeus/integration_blueprint +https://github.com/toggm/askoheat """ from __future__ import annotations diff --git a/custom_components/integration_blueprint/api.py b/custom_components/askoheat/api.py similarity index 100% rename from custom_components/integration_blueprint/api.py rename to custom_components/askoheat/api.py diff --git a/custom_components/integration_blueprint/binary_sensor.py b/custom_components/askoheat/binary_sensor.py similarity index 92% rename from custom_components/integration_blueprint/binary_sensor.py rename to custom_components/askoheat/binary_sensor.py index 2491e7e..c3c1710 100644 --- a/custom_components/integration_blueprint/binary_sensor.py +++ b/custom_components/askoheat/binary_sensor.py @@ -1,4 +1,4 @@ -"""Binary sensor platform for integration_blueprint.""" +"""Binary sensor platform for askoheat.""" from __future__ import annotations @@ -21,7 +21,7 @@ ENTITY_DESCRIPTIONS = ( BinarySensorEntityDescription( - key="integration_blueprint", + key="askoheat", name="Integration Blueprint Binary Sensor", device_class=BinarySensorDeviceClass.CONNECTIVITY, ), @@ -44,7 +44,7 @@ async def async_setup_entry( class IntegrationBlueprintBinarySensor(IntegrationBlueprintEntity, BinarySensorEntity): - """integration_blueprint binary_sensor class.""" + """askoheat binary_sensor class.""" def __init__( self, diff --git a/custom_components/integration_blueprint/config_flow.py b/custom_components/askoheat/config_flow.py similarity index 100% rename from custom_components/integration_blueprint/config_flow.py rename to custom_components/askoheat/config_flow.py diff --git a/custom_components/integration_blueprint/const.py b/custom_components/askoheat/const.py similarity index 66% rename from custom_components/integration_blueprint/const.py rename to custom_components/askoheat/const.py index ff45085..9264441 100644 --- a/custom_components/integration_blueprint/const.py +++ b/custom_components/askoheat/const.py @@ -1,8 +1,8 @@ -"""Constants for integration_blueprint.""" +"""Constants for askoheat.""" from logging import Logger, getLogger LOGGER: Logger = getLogger(__package__) -DOMAIN = "integration_blueprint" +DOMAIN = "askoheat" ATTRIBUTION = "Data provided by http://jsonplaceholder.typicode.com/" diff --git a/custom_components/integration_blueprint/coordinator.py b/custom_components/askoheat/coordinator.py similarity index 96% rename from custom_components/integration_blueprint/coordinator.py rename to custom_components/askoheat/coordinator.py index 809cec5..b9cd908 100644 --- a/custom_components/integration_blueprint/coordinator.py +++ b/custom_components/askoheat/coordinator.py @@ -1,4 +1,4 @@ -"""DataUpdateCoordinator for integration_blueprint.""" +"""DataUpdateCoordinator for askoheat.""" from __future__ import annotations diff --git a/custom_components/integration_blueprint/data.py b/custom_components/askoheat/data.py similarity index 93% rename from custom_components/integration_blueprint/data.py rename to custom_components/askoheat/data.py index cdeb1ea..304a8b0 100644 --- a/custom_components/integration_blueprint/data.py +++ b/custom_components/askoheat/data.py @@ -1,4 +1,4 @@ -"""Custom types for integration_blueprint.""" +"""Custom types for askoheat.""" from __future__ import annotations diff --git a/custom_components/integration_blueprint/entity.py b/custom_components/askoheat/entity.py similarity index 100% rename from custom_components/integration_blueprint/entity.py rename to custom_components/askoheat/entity.py diff --git a/custom_components/askoheat/manifest.json b/custom_components/askoheat/manifest.json new file mode 100644 index 0000000..f038bfb --- /dev/null +++ b/custom_components/askoheat/manifest.json @@ -0,0 +1,12 @@ +{ + "domain": "askoheat", + "name": "Askoheat+", + "codeowners": [ + "@toggm" + ], + "config_flow": true, + "documentation": "https://github.com/toggm/askoheat", + "iot_class": "cloud_polling", + "issue_tracker": "https://github.com/toggm/askoheat/issues", + "version": "0.0.0" +} \ No newline at end of file diff --git a/custom_components/integration_blueprint/sensor.py b/custom_components/askoheat/sensor.py similarity index 92% rename from custom_components/integration_blueprint/sensor.py rename to custom_components/askoheat/sensor.py index bd5f89b..f6f0c95 100644 --- a/custom_components/integration_blueprint/sensor.py +++ b/custom_components/askoheat/sensor.py @@ -1,4 +1,4 @@ -"""Sensor platform for integration_blueprint.""" +"""Sensor platform for askoheat.""" from __future__ import annotations @@ -17,7 +17,7 @@ ENTITY_DESCRIPTIONS = ( SensorEntityDescription( - key="integration_blueprint", + key="askoheat", name="Integration Sensor", icon="mdi:format-quote-close", ), @@ -40,7 +40,7 @@ async def async_setup_entry( class IntegrationBlueprintSensor(IntegrationBlueprintEntity, SensorEntity): - """integration_blueprint Sensor class.""" + """askoheat Sensor class.""" def __init__( self, diff --git a/custom_components/integration_blueprint/switch.py b/custom_components/askoheat/switch.py similarity index 93% rename from custom_components/integration_blueprint/switch.py rename to custom_components/askoheat/switch.py index 7629220..22ad3b3 100644 --- a/custom_components/integration_blueprint/switch.py +++ b/custom_components/askoheat/switch.py @@ -1,4 +1,4 @@ -"""Switch platform for integration_blueprint.""" +"""Switch platform for askoheat.""" from __future__ import annotations @@ -17,7 +17,7 @@ ENTITY_DESCRIPTIONS = ( SwitchEntityDescription( - key="integration_blueprint", + key="askoheat", name="Integration Switch", icon="mdi:format-quote-close", ), @@ -40,7 +40,7 @@ async def async_setup_entry( class IntegrationBlueprintSwitch(IntegrationBlueprintEntity, SwitchEntity): - """integration_blueprint switch class.""" + """askoheat switch class.""" def __init__( self, diff --git a/custom_components/integration_blueprint/translations/en.json b/custom_components/askoheat/translations/en.json similarity index 86% rename from custom_components/integration_blueprint/translations/en.json rename to custom_components/askoheat/translations/en.json index 049f7a4..5480578 100644 --- a/custom_components/integration_blueprint/translations/en.json +++ b/custom_components/askoheat/translations/en.json @@ -2,7 +2,7 @@ "config": { "step": { "user": { - "description": "If you need help with the configuration have a look here: https://github.com/ludeeus/integration_blueprint", + "description": "If you need help with the configuration have a look here: https://github.com/toggm/askoheat", "data": { "username": "Username", "password": "Password" diff --git a/custom_components/integration_blueprint/manifest.json b/custom_components/integration_blueprint/manifest.json deleted file mode 100644 index 817cd7b..0000000 --- a/custom_components/integration_blueprint/manifest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "domain": "integration_blueprint", - "name": "Integration blueprint", - "codeowners": [ - "@ludeeus" - ], - "config_flow": true, - "documentation": "https://github.com/ludeeus/integration_blueprint", - "iot_class": "cloud_polling", - "issue_tracker": "https://github.com/ludeeus/integration_blueprint/issues", - "version": "0.0.0" -} \ No newline at end of file diff --git a/hacs.json b/hacs.json index d393a98..7f42901 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { - "name": "Integration blueprint", + "name": "Askoheat", "hide_default_branch": true, - "homeassistant": "2024.6.0", + "homeassistant": "2024.10.3", "render_readme": true } \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 5cdce18..78e8bdf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ colorlog==6.8.2 -homeassistant==2024.6.0 +homeassistant==2024.10.3 pip>=21.3.1 ruff==0.7.1 +pymodbus==3.7.4 diff --git a/scripts/develop b/scripts/develop index 89eda50..6e18ead 100755 --- a/scripts/develop +++ b/scripts/develop @@ -11,7 +11,7 @@ if [[ ! -d "${PWD}/config" ]]; then fi # Set the path to custom_components -## This let's us have the structure we want /custom_components/integration_blueprint +## This let's us have the structure we want /custom_components/askoheat ## while at the same time have Home Assistant configuration inside /config ## without resulting to symlinks. export PYTHONPATH="${PYTHONPATH}:${PWD}/custom_components"