Skip to content

Commit

Permalink
Merge pull request #12 from bluecurrent/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Floris272 authored May 5, 2023
2 parents d02cec3 + 42e5172 commit 8ae73f8
Show file tree
Hide file tree
Showing 45 changed files with 2,973 additions and 669 deletions.
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ludeeus/integration_blueprint",
"name": "bluecurrent/ha-bluecurrent",
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.10-bullseye",
"postCreateCommand": "scripts/setup",
"forwardPorts": [
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 currently [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 currently [previous issues](https://github.com/bluecurrent/ha-bluecurrent/issues?q=is%3Aissue+label%3A%22Bug%22+)..
required: true
- type: textarea
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/bluecurrent/ha-bluecurrent/issues?q=is%3Aissue+label%3A%22Feature+Request%22+).
required: true

- type: textarea
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
shell: "bash"
run: |
yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
"${{ github.workspace }}/custom_components/integration_blueprint/manifest.json"
"${{ github.workspace }}/custom_components/blue_current/manifest.json"
- 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/blue_current"
zip blue_current.zip -r ./
- name: "Upload the ZIP file to the release"
uses: softprops/[email protected]
with:
files: ${{ github.workspace }}/custom_components/integration_blueprint/integration_blueprint.zip
files: ${{ github.workspace }}/custom_components/blue_current/blue_current.zip
61 changes: 0 additions & 61 deletions CONTRIBUTING.md

This file was deleted.

115 changes: 68 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,68 @@
# Notice

The component and platforms in this repository are not meant to be used by a
user, but as a "blueprint" that custom component developers can build
upon, to make more awesome stuff.

HAVE FUN! 😎

## Why?

This is simple, by having custom_components look (README + structure) the same
it is easier for developers to help each other and for users to start using them.

If you are a developer and you want to add things to this "blueprint" that you think more
developers will have use for, please open a PR to add it :)

## What?

This repository contains multiple files, here is a overview:

File | Purpose | Documentation
-- | -- | --
`.devcontainer.json` | Used for development/testing with Visual Studio Code. | [Documentation](https://code.visualstudio.com/docs/remote/containers)
`.github/ISSUE_TEMPLATE/*.yml` | Templates for the issue tracker | [Documentation](https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository)
`.vscode/tasks.json` | Tasks for the devcontainer. | [Documentation](https://code.visualstudio.com/docs/editor/tasks)
`custom_components/integration_blueprint/*` | Integration files, this is where everything happens. | [Documentation](https://developers.home-assistant.io/docs/creating_component_index)
`CONTRIBUTING.md` | Guidelines on how to contribute. | [Documentation](https://help.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors)
`LICENSE` | The license file for the project. | [Documentation](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository)
`README.md` | The file you are reading now, should contain info about the integration, installation and configuration instructions. | [Documentation](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax)
`requirements.txt` | Python packages used for development/lint/testing this integration. | [Documentation](https://pip.pypa.io/en/stable/user_guide/#requirements-files)

## How?

1. Create a new repository in GitHub, using this repository as a template by clicking the "Use this template" button in the GitHub UI.
1. Open your new repository in Visual Studio Code devcontainer (Preferably with the "`Dev Containers: Clone Repository in Named Container Volume...`" option).
1. Rename all instances of the `integration_blueprint` to `custom_components/<your_integration_domain>` (e.g. `custom_components/awesome_integration`).
1. Rename all instances of the `Integration Blueprint` to `<Your Integration Name>` (e.g. `Awesome Integration`).
1. Run the `scrtipts/develop` to start HA and test out your new integration.

## Next steps

These are some next steps you may want to look into:
- Add tests to your integration, [`pytest-homeassistant-custom-component`](https://github.com/MatthewFlamm/pytest-homeassistant-custom-component) can help you get started.
- Add brand images (logo/icon) to https://github.com/home-assistant/brands.
- Create your first release.
- Share your integration on the [Home Assistant Forum](https://community.home-assistant.io/).
- Submit your integration to the [HACS](https://hacs.xyz/docs/publish/start).
# Integration Blueprint

[![hacs_badge](https://img.shields.io/badge/HACS-Custom-41BDF5.svg?style=for-the-badge)](https://github.com/hacs/integration)

The Blue Current integration allows you to connect to your blue current account to Home Assistant and monitor your charge point(s).


## Prerequisites
1. Log in to [my.bluecurrent](https://my.bluecurrent.nl/).
2. Goto settings and enable developer mode.
3. Generate an API token.


## Installation

- [HACS](https://hacs.xyz/): add url https://github.com/bluecurrent/ha-bluecurrent as custom repository (HACS > Integration > option: Custom Repositories)
- Restart Home Assistant.
- Add 'Blue current' integration via HA Settings > 'Devices and Services' > 'Integrations'.
- Provide your api key.

## Configuration is done in the UI

# Platforms

## Sensor
The Blue Current integration provides the following sensors:
### Charge point sensors
- Activity
- Average current
- Average voltage
- Energy usage in kWh
- Max usage in Amps
- The max amps the charge point can use.
- Offline since
- Started on
- Stopped on
- Total cost in EUR
- Total kW (estimate)
- Vehicle status
The following sensors are created as well, but disabled by default:
- Current phase 1-3
- offline max usage
- remaining current
- smart charging max usage
- Voltage phase 1-3
### Grid sensors
- Grid average current
- Grid max current
The following sensors are created as well, but disabled by default:
- Grid current phase 1-3

## Switch
The Blue Current integration provides the following switches:

- Operative
- Enables or disables a charge point.
- Plug and charge
- Allows you to start a session without having to scan a card.
- Public charging
- Allows other people to use your charge point.

## Button
The Blue Current integration provides the following buttons:

- Start session
- Stop session
- Reset
- Reboot
59 changes: 0 additions & 59 deletions README_EXAMPLE.md

This file was deleted.

1 change: 1 addition & 0 deletions custom_components/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Custom Component for Home Assistant."""
Loading

0 comments on commit 8ae73f8

Please sign in to comment.