-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议:能否把该项目整合进hassio-addons #63
Labels
Comments
我大概写了一下,但是还没测试 name: SGCC Electricity Data Collector
description: Collects electricity data from State Grid Corporation of China and integrates it with Home Assistant.
version: "1.0.0"
slug: sgcc_electricity
repository: local
# 构建配置
build:
from: homeassistant/amd64-base:latest
python_version: "3.9"
# 系统配置
system:
arch:
- aarch64
- amd64
- armhf
- armv7
machine: all
# 容器配置
docker:
image: arcw/sgcc_electricity:latest
run_as_root: false
# WebUI 配置 (如果有)
# webui: "/webui -> http://127.0.0.1:8080/"
# 端口映射 (如果有)
# ports:
# 8080/tcp: 8080
# 设备访问 (如果有)
# devices:
# - /dev/ttyUSB0
# 临时卷配置 (如果有)
# tmpfs:
# /run: size=65536k,mode=755
# 持久化卷配置
persistence:
- /data
# 启动顺序
startup: application
# 主机网络
host_network: false
# 主机 PID 命名空间
host_pid: false
# 环境变量
environment:
- TZ=Asia/Shanghai
# 权限设置
options:
username: !secret sgcc_username
password: !secret sgcc_password
ha_url: !secret home_assistant_url
ha_token: !secret home_assistant_long_lived_access_token
enable_database_storage: "true" # 可选,是否启用数据库存储,默认为 true
database_path: "/data/homeassistant.db" # 数据库路径
user_id: "your_user_id" # 用户 ID,如果有多户号,可以是逗号分隔的列表
first_sleep_time: "10" # 首次运行等待时间,默认为 10 秒
# 用户可配置的选项
schema:
username:
type: string
required: true
password:
type: string
required: true
ha_url:
type: string
required: true
ha_token:
type: string
required: true
enable_database_storage:
type: boolean
required: false
default: true
database_path:
type: string
required: false
default: "/data/homeassistant.db"
user_id:
type: string
required: true
first_sleep_time:
type: integer
required: false
default: 10
# 依赖关系 (如果有)
dependencies:
- slug: samba-share # 如果需要访问外部存储
# 警告信息 (如果有)
warning: "This add-on is experimental and might not work as expected."
# 文档链接
documentation: https://github.com/ARC-MX/sgcc_electricity_new
# 看门狗配置
watchdog:
enabled: true
max_retry: 3
restart_policy: always
# 自动更新配置
auto_update: false
# 日志级别
log_level: info |
这个想法可以,后面想想咋搞 |
应该只需要在你的仓库里写一个config.json文件,再把你的仓库地址放在addons源里就可以识别了 |
期待 |
你可以测试一下,回头贡献一下,我来合并 |
期待一波 |
期待 |
1 similar comment
期待 |
上线了吗 ? |
初步测试阶段,还未正式提交 |
有需要的可以试试,文档在ha_addon_doc,推荐使用国内源https://gitee.com/ARC-MX/sgcc_electricity_new |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: