From fa507b4ca2dede9f069e5b75cfa8cc7967b03bf8 Mon Sep 17 00:00:00 2001 From: juanillo62gm Date: Fri, 15 Nov 2024 01:59:12 +0000 Subject: [PATCH] docs(readme): main content --- LICENSE | 2 +- README.md | 87 ++++++++++++++++++++++++++++------------------- README_EXAMPLE.md | 56 ------------------------------ 3 files changed, 53 insertions(+), 92 deletions(-) delete mode 100755 README_EXAMPLE.md diff --git a/LICENSE b/LICENSE index 4e14a63..32e120f 100755 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 - 2024 Joakim Sørensen @ludeeus +Copyright (c) 2024 Juanillo62gm 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.md b/README.md index bce52ad..f9e2f2a 100755 --- a/README.md +++ b/README.md @@ -1,47 +1,64 @@ -# Notice +[![hacs_badge](https://img.shields.io/badge/HACS-Custom-41BDF5.svg?style=for-the-badge)](https://github.com/hacs/integration) -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. +[![GitHub Release][releases-shield]][releases] +[![GitHub Activity][commits-shield]][commits] +[![License][license-shield]](LICENSE) -HAVE FUN! 😎 +[![Project Maintenance][maintenance-shield]][maintainer] +[![BuyMeCoffee][buymecoffeebadge]][buymecoffee] -## Why? +# Panda PWR +## Home Assistant Integration -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. +Integrate your [Panda PWR from BIGTREETECH (BTT) | BIQU][pandapwrwiki] with Home Assistant. -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 :) +[![PandaPWRDevice](https://bttwiki.com/img/PandaPWR/interface.jpg)][pandapwrwiki] -## What? -This repository contains multiple files, here is a overview: +**This integration will set up the following platforms.** -| 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/panda_pwr/*` | 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) | +| Platform | Entity | Description | +| --------------- | ----------------------- | ------------------------------------------------- | +| `switch` | `PowerSwitch` | Controls the power state of the PandaPWR device. | +| `switch` | `UsbSwitch` | Controls the USB state of the PandaPWR device. | +| `sensor` | `CountdownStateSensor` | Shows the countdown state of the device. | +| `sensor` | `AutoPoweroffSensor` | Displays the auto power-off state. | +| `sensor` | `CountdownSensor` | Shows the countdown timer in seconds. | +| `sensor` | `VoltageSensor` | Measures the voltage (in volts). | +| `sensor` | `CurrentSensor` | Measures the current (in amperes). | +| `sensor` | `PowerSensor` | Measures the power consumption (in watts). | +| `sensor` | `EnergyUsageSensor` | Tracks energy usage (in kilowatt-hours). | +| `binary_sensor` | `PowerStateBinarySensor`| Indicates if the power is on or off. | +| `binary_sensor` | `UsbStateBinarySensor` | Indicates if the USB port is on or off. | -## 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 `panda_pwr` to `custom_components/` (e.g. `custom_components/awesome_integration`). -1. Rename all instances of the `Panda PWR` to `` (e.g. `Awesome Integration`). -1. Run the `scripts/develop` to start HA and test out your new integration. +## Installation -## Next steps +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 `HA-Panda-PWR`. +1. Download _all_ the files from the `custom_components/HA-Panda-PWR/` 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 "Panda PWR" -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 [HACS](https://hacs.xyz/docs/publish/start). +## Configuration is done in the UI + + + +## Contributions are welcome! + +If you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md) + +*** + +[pandapwrwiki]: https://bttwiki.com/Panda%20PWR.html +[buymecoffee]: https://paypal.me/juanillo62gm +[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/juanillo62gm/HA-Panda-PWR.svg?style=for-the-badge +[commits]: https://github.com/juanillo62gm/HA-Panda-PWR/commits/main +[license-shield]: https://img.shields.io/github/license/juanillo62gm/HA-Panda-PWR.svg?style=for-the-badge +[maintainer]: https://github.com/juanillo62gm +[maintenance-shield]: https://img.shields.io/badge/maintainer-%20%40juanillo62gm-blue.svg?style=for-the-badge +[releases-shield]: https://img.shields.io/github/release/juanillo62gm/HA-Panda-PWR.svg?style=for-the-badge +[releases]: https://github.com/juanillo62gm/HA-Panda-PWR/releases diff --git a/README_EXAMPLE.md b/README_EXAMPLE.md deleted file mode 100755 index 87321e2..0000000 --- a/README_EXAMPLE.md +++ /dev/null @@ -1,56 +0,0 @@ -# Panda PWR - -[![GitHub Release][releases-shield]][releases] -[![GitHub Activity][commits-shield]][commits] -[![License][license-shield]](LICENSE) - -![Project Maintenance][maintenance-shield] -[![BuyMeCoffee][buymecoffeebadge]][buymecoffee] - -[![Discord][discord-shield]][discord] -[![Community Forum][forum-shield]][forum] - -_Integration to integrate with [panda_pwr][panda_pwr]._ - -**This integration will set up the following platforms.** - -| Platform | Description | -| --------------- | ----------------------------------- | -| `binary_sensor` | Show something `True` or `False`. | -| `sensor` | Show info from blueprint API. | -| `switch` | Switch something `True` or `False`. | - -## Installation - -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 `panda_pwr`. -1. Download _all_ the files from the `custom_components/panda_pwr/` 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 "Panda PWR" - -## Configuration is done in the UI - - - -## Contributions are welcome! - -If you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md) - -*** - -[panda_pwr]: https://github.com/ludeeus/panda_pwr -[buymecoffee]: https://www.buymeacoffee.com/ludeeus -[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/panda_pwr.svg?style=for-the-badge -[commits]: https://github.com/ludeeus/panda_pwr/commits/main -[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-shield]: https://img.shields.io/github/license/ludeeus/panda_pwr.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/panda_pwr.svg?style=for-the-badge -[releases]: https://github.com/ludeeus/panda_pwr/releases