-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add release action and update markdown docs with linter rule (#9)
* update markdown docs with linter rule * add release action and update markdown docs with linter rule
- Loading branch information
Showing
84 changed files
with
3,549 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
blank_issues_enabled: true | ||
--- | ||
blank_issues_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
plugins: | ||
- json | ||
rules: | ||
json/*: | ||
- error | ||
- allowComments: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
max-line-length = 500 | ||
extend-ignore = E203,E701 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[FORMAT] | ||
max-line-length=500 | ||
[MESSAGES CONTROL] | ||
disable=import-error, logging-fstring-interpolation, missing-class-docstring,missing-function-docstring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
extends: default | ||
rules: | ||
line-length: | ||
max: 500 | ||
level: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# PR Description | ||
|
||
## Reason & Detail | ||
|
||
## Releted issue | ||
|
||
fix #X | ||
|
||
<!-- | ||
please change X to issue id, it will auto close this issue once PR closed | ||
Example: | ||
fix #1 | ||
it will auto close issue #1 once PR closed | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
--- | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
permissions: {} | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
generate_zip: | ||
name: Generate release zip | ||
runs-on: [ubuntu-latest] | ||
timeout-minutes: 60 | ||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
clean: true | ||
- name: Zip release file | ||
run: | | ||
apt-get update || exit 1 | ||
apt-get install zip || exit 1 | ||
echo "show runner hostname" | ||
hostname | ||
echo "show runner user" | ||
whoami | ||
echo "show runner pwd" | ||
pwd | ||
echo "show runner kernel" | ||
uname -a | ||
echo "show runner pwd file list" | ||
ls | ||
ls -alht "custom_components/midea_ac_lan/" || exit 1 | ||
echo "show manifest.json for debug" | ||
cat "custom_components/midea_ac_lan/manifest.json" || exit 1 | ||
dst_dir="/github/workspace/artifacts" | ||
sudo mkdir -p "$dst_dir" || exit 1 | ||
sudo chown -R "$(id -u):$(id -g)" "$dst_dir" || exit 1 | ||
sudo chmod -R 755 "$dst_dir" || exit 1 | ||
cd "custom_components/midea_ac_lan/" || exit 1 | ||
zip -r "../midea_ac_lan.zip" "./*" || exit 1 | ||
cp "../midea_ac_lan.zip" "$dst_dir/midea_ac_lan.zip" || exit 1 | ||
ls -alht "$dst_dir" || exit 1 | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: midea_ac_lan.zip | ||
path: /github/workspace/artifacts | ||
|
||
upload_release: | ||
needs: generate_zip | ||
name: Publish release | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download All Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
pattern: midea_ac_lan.zip | ||
merge-multiple: true | ||
|
||
- name: Display Structure of Artifacts Files | ||
run: ls -R | ||
|
||
- name: Show Working Directory For Debug Purpose | ||
run: | | ||
echo "show runner hostname" | ||
hostname | ||
echo "show runner user" | ||
whoami | ||
echo "show runner disk usage" | ||
df -h | ||
echo "show runner pwd" | ||
pwd | ||
echo "show runner kernel" | ||
uname -a | ||
echo "show runner pwd file list" | ||
ls | ||
ls -alht | ||
echo "show runner artifacts" | ||
ls -alht artifacts || exit 0 | ||
echo "github.ref: ${{github.ref}}" | ||
- name: Upload images to Release Asset | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: artifacts/midea_ac_lan.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
|
||
--- | ||
name: HACS Validation | ||
|
||
on: | ||
pull_request: | ||
push: | ||
# schedule: | ||
# - cron: "0 0 * * *" | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
validate: | ||
name: HASS and Hassfest Validation | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
- uses: "actions/checkout@v4" | ||
|
||
- name: HACS Action | ||
uses: hacs/action@main | ||
with: | ||
category: "integration" | ||
- name: HACS Action | ||
uses: hacs/action@main | ||
with: | ||
category: "integration" | ||
|
||
- name: Hassfest validation | ||
uses: "home-assistant/actions/hassfest@master" | ||
- name: Hassfest validation | ||
uses: "home-assistant/actions/hassfest@master" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Light | ||
## Features | ||
- Supports Brightness | ||
- Supports Color Temperature | ||
- Supports Effect (Scene) | ||
|
||
## Customize | ||
|
||
Set the light's color temperature range in Kelvin ([2700, 6500] by default). | ||
|
||
```json | ||
{"color_temp_range_kelvin": [2000, 6800]} | ||
``` | ||
|
||
## Entities | ||
### Default entity | ||
| EntityID | Class | Description | | ||
|------------------------|-------|--------------| | ||
| light.{DEVICEID}_light | light | Light entity | | ||
|
||
### Extra entity | ||
|
||
No extra entity | ||
|
||
|
||
## Service | ||
|
||
No Service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 智能灯 | ||
## 特性 | ||
- 支持亮度调节 | ||
- 支持色温调节 | ||
- 支持灯效(场景)调节 | ||
|
||
## 自定义 | ||
|
||
设置灯的以开尔文表示的色温范围 (默认为[2700, 6500]). | ||
|
||
```json | ||
{"color_temp_range_kelvin": [2000, 6800]} | ||
``` | ||
|
||
## 实体 | ||
### 默认实体 | ||
| 实体ID | 类型 | 描述 | | ||
|------------------------|-------|-----| | ||
| light.{DEVICEID}_light | light | 灯实体 | | ||
|
||
### 扩展传感器 | ||
无扩展传感器 | ||
|
||
|
||
## 服务 | ||
无服务 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Bathroom Master | ||
## Features | ||
- Supports preset mode | ||
- Supports fan direction setting | ||
|
||
## Entities | ||
### Default entity | ||
No Default entity | ||
|
||
### Extra entities | ||
|
||
| EntityID | Class | Description | | ||
|-----------------------------------------|---------------|---------------------| | ||
| sensor.{DEVICEID}_current_temperature | sensor | Current Temperature | | ||
| sensor.{DEVICEID}_current_humidity | sensor | Current Humidity | | ||
| binary_sensor.{DEVICEID}_current_radar | binary_sensor | Occupancy Status | | ||
| switch.{DEVICEID}_main_light | switch | Main Light | | ||
| switch.{DEVICEID}_night_light | switch | Night Light | | ||
| select.{DEVICEID}_mode | select | Mode | | ||
| select.{DEVICEID}_direction | select | Fan direction | | ||
|
||
## Service | ||
|
||
### midea_ac_lan.set_attribute | ||
|
||
[![Service](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=midea_ac_lan.set_attribute) | ||
|
||
Set the attribute of appliance. Service data: | ||
|
||
| Name | Description | | ||
|-----------|---------------------------------------------| | ||
| device_id | The Appliance code (Device ID) of appliance | | ||
| attribute | "main_light"<br/>"night_light" | | ||
| value | true or false | | ||
|
||
| Name | Description | | ||
|-----------|------------------------------------------------------------------------------------------| | ||
| device_id | The Appliance code (Device ID) of appliance | | ||
| attribute | "mode" | | ||
| value | "Off"<br/>"Heat(high)"<br/>"Heat(low)"<br/>"Bath"<br/>"Blow"<br/>"Ventilation"<br/>"Dry" | | ||
|
||
| Name | Description | | ||
|-----------|---------------------------------------------------------| | ||
| device_id | The Appliance code (Device ID) of appliance | | ||
| attribute | "direction" | | ||
| value | 60<br/>70<br/>80<br/>90<br/>100<br/>110<br/>"Oscillate" | | ||
|
||
Example | ||
```yaml | ||
service: midea_ac_lan.set_attribute | ||
data: | ||
device_id: XXXXXXXXXXXX | ||
attribute: main_light | ||
value: true | ||
``` | ||
```yaml | ||
service: midea_ac_lan.set_attribute | ||
data: | ||
device_id: XXXXXXXXXXXX | ||
attribute: mode | ||
value: Bath | ||
``` | ||
```yaml | ||
service: midea_ac_lan.set_attribute | ||
data: | ||
device_id: XXXXXXXXXXXX | ||
attribute: direction | ||
value: 70 | ||
``` |
Oops, something went wrong.