Skip to content

Commit

Permalink
fixed device association
Browse files Browse the repository at this point in the history
  • Loading branch information
toggm committed Nov 25, 2024
1 parent 36df6b9 commit e40ae3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 51 deletions.
49 changes: 3 additions & 46 deletions README_ORIG.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,8 @@
# 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 `scripts/develop` to start HA and test out your new integration.
## Implementation tasks
- [ ] Add translations for en and de
- [ ] Create tests

## Next steps

Expand All @@ -45,13 +12,3 @@ These are some next steps you may want to look into:
- Create your first release.
- Share your integration on the [Home Assistant Forum](https://community.home-assistant.io/).
- Submit your integration to [HACS](https://hacs.xyz/docs/publish/start).


## TODO
- [ ] Integration configuration parameter sections
- [ ] Integration data sensors
- [ ] Integrate write operations for switches and number inputs
- [ ] Add translations for en and de
- [ ] Create service to start auto-feed linked to solar entity and a reserve
- [ ] Provide meatures
- [ ] Cleanup and document
10 changes: 5 additions & 5 deletions custom_components/askoheat/api_ema_desc.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,35 @@
binary_sensors=[
AskoheatBinarySensorEntityDescription(
key=BinarySensorAttrKey.HEATER1_ACTIVE,
device_key=DeviceKey.HEATPUMP_CONTROL_UNIT,
device_key=DeviceKey.WATER_HEATER_CONTROL_UNIT,
icon="mdi:power-plug",
device_class=BinarySensorDeviceClass.RUNNING,
api_descriptor=FlagRegisterInputDescriptor(starting_register=16, bit=0),
),
AskoheatBinarySensorEntityDescription(
key=BinarySensorAttrKey.HEATER2_ACTIVE,
device_key=DeviceKey.HEATPUMP_CONTROL_UNIT,
device_key=DeviceKey.WATER_HEATER_CONTROL_UNIT,
icon="mdi:power-plug",
device_class=BinarySensorDeviceClass.RUNNING,
api_descriptor=FlagRegisterInputDescriptor(starting_register=16, bit=1),
),
AskoheatBinarySensorEntityDescription(
key=BinarySensorAttrKey.HEATER3_ACTIVE,
device_key=DeviceKey.HEATPUMP_CONTROL_UNIT,
device_key=DeviceKey.WATER_HEATER_CONTROL_UNIT,
icon="mdi:power-plug",
device_class=BinarySensorDeviceClass.RUNNING,
api_descriptor=FlagRegisterInputDescriptor(starting_register=16, bit=2),
),
AskoheatBinarySensorEntityDescription(
key=BinarySensorAttrKey.PUMP_ACTIVE,
device_key=DeviceKey.HEATPUMP_CONTROL_UNIT,
device_key=DeviceKey.WATER_HEATER_CONTROL_UNIT,
icon="mdi:pump",
device_class=BinarySensorDeviceClass.RUNNING,
api_descriptor=FlagRegisterInputDescriptor(starting_register=16, bit=3),
),
AskoheatBinarySensorEntityDescription(
key=BinarySensorAttrKey.RELAY_BOARD_CONNECTED,
device_key=DeviceKey.HEATPUMP_CONTROL_UNIT,
device_key=DeviceKey.WATER_HEATER_CONTROL_UNIT,
icon="mdi:connection",
device_class=BinarySensorDeviceClass.PROBLEM,
api_descriptor=FlagRegisterInputDescriptor(starting_register=16, bit=4),
Expand Down

0 comments on commit e40ae3b

Please sign in to comment.