mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-06-21 15:20:00 +08:00
feat: first commit
This commit is contained in:
77
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
77
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
name: Bug report / 报告问题
|
||||
description: Create a report to help us improve. / 报告问题以帮助我们改进
|
||||
title: "[Bug]: "
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: input
|
||||
attributes:
|
||||
label: Describe the bug / 描述问题
|
||||
description: |
|
||||
> A clear and concise description of what the bug is.
|
||||
> 清晰且简明地描述问题。
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: To Reproduce / 复现步骤
|
||||
description: |
|
||||
> If applicable, add screenshots to help explain your problem. You can attach images by clicking this area to highlight it and then dragging files in. Steps to reproduce the behavior:
|
||||
> 如有需要,可添加截图以帮助解释问题。点击此区域以高亮显示并拖动截图文件以上传。请详细描述复现步骤:
|
||||
placeholder: |
|
||||
1. Go to ...
|
||||
2. Click on ...
|
||||
3. Scroll down to ...
|
||||
4. See error
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Expected behavior / 预期结果
|
||||
description: |
|
||||
> A clear and concise description of what you expected to happen.
|
||||
> 描述预期结果。
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Home Assistant Logs / 系统日志
|
||||
description: |
|
||||
> [Settings > System > Logs > DOWNLOAD FULL LOG](https://my.home-assistant.io/redirect/logs) > Filter `xiaomi_home`
|
||||
> [设置 > 系统 > 日志 > 下载完整日志](https://my.home-assistant.io/redirect/logs) > 筛选 `xiaomi_home`
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Home Assistant Core version / Home Assistant Core 版本
|
||||
description: |
|
||||
> [Settings > About](https://my.home-assistant.io/redirect/info)
|
||||
> [设置 > 关于 Home Assistant](https://my.home-assistant.io/redirect/info)
|
||||
placeholder: "2024.8.1"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Home Assistant Operation System version / Home Assistant Operation System 版本
|
||||
description: |
|
||||
> [Settings > About](https://my.home-assistant.io/redirect/info)
|
||||
> [设置 > 关于 Home Assistant](https://my.home-assistant.io/redirect/info)
|
||||
placeholder: "12.4"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Xiaomi Home integration version / 米家集成版本
|
||||
description: |
|
||||
> [Settings > Devices & services > Configured > `Xiaomi Home`](https://my.home-assistant.io/redirect/integration/?domain=xiaomi_home)
|
||||
> [设置 > 设备与服务 > 已配置 > `Xiaomi Home`](https://my.home-assistant.io/redirect/integration/?domain=xiaomi_home)
|
||||
placeholder: "v0.0.1"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context / 其他说明
|
9
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
9
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Feature Suggestion / 功能建议
|
||||
url: https://github.com/XiaoMi/ha_xiaomi_home/discussions/new?category=ideas
|
||||
about: Share ideas for enhancements or new features. / 建议改进或增加新功能
|
||||
|
||||
- name: Support and Help / 支持与帮助
|
||||
url: https://github.com/XiaoMi/ha_xiaomi_home/discussions/categories/q-a
|
||||
about: Please ask and answer questions here. / 请在这里提问和答疑
|
79
.github/workflows/validate.yaml
vendored
Normal file
79
.github/workflows/validate.yaml
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
name: Validate
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
validate-hassfest:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Hassfest validation
|
||||
uses: home-assistant/actions/hassfest@master
|
||||
|
||||
validate-hacs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: HACS validation
|
||||
uses: hacs/action@main
|
||||
with:
|
||||
category: integration
|
||||
ignore: brands
|
||||
|
||||
validate-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check format
|
||||
run: |
|
||||
./custom_components/xiaomi_home/test/test_all.sh
|
||||
|
||||
validate-lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pylint
|
||||
|
||||
- name: Analyse the code with pylint
|
||||
run: |
|
||||
pylint $(git ls-files '*.py')
|
||||
|
||||
validate-setup:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install the integration
|
||||
run: |
|
||||
export config_path=./test_config
|
||||
mkdir $config_path
|
||||
./install.sh $config_path
|
||||
echo "default_config:" >> $config_path/configuration.yaml
|
||||
echo "logger:" >> $config_path/configuration.yaml
|
||||
echo " default: info" >> $config_path/configuration.yaml
|
||||
echo " logs:" >> $config_path/configuration.yaml
|
||||
echo " custom_components.xiaomi_home: debug" >> $config_path/configuration.yaml
|
||||
|
||||
- name: Setup Home Assistant
|
||||
id: homeassistant
|
||||
uses: ludeeus/setup-homeassistant@main
|
||||
with:
|
||||
config-dir: ./test_config
|
Reference in New Issue
Block a user