2
105
2016
金牌会员
involute 发表于 2021-8-31 02:28 看来这还是我的问题呢,我看看怎么弄
使用道具 举报
20
550
3611
元老级技术达人
foxwywh 发表于 2021-8-31 14:28 在研读大神的插件,能分享下插件开发的资料,想学习下
BH4WHN 发表于 2021-8-31 00:01 一语点醒梦中人,我总算是搞明白了,我是用官网推荐方式之一core venv方式安装,hass存储路径是/home/home ...
def path(self, *path: str) -> str: """Generate path to the file within the configuration directory. Async friendly. """ if self.config_dir is None: raise HomeAssistantError("config_dir is not set") return os.path.join(self.config_dir, *path)
_LOGGER.debug(hass.config.path)
0
37
667
高级会员
dscao 发表于 2021-8-21 01:32 牛,把这个改成插件形式了,硬件接好后,使用上就更方便了。 之前我用的PZ004电表误差太大,达到了10%左右 ...
5
270
2937
involute 发表于 2021-9-2 02:24 我看HomeAssistant的源代码, path取得是这样的
BH4WHN 发表于 2021-9-2 20:23 久等了,调试输出信息如下 2021-09-02 20:17:28 DEBUG (MainThread) [custom_components.peacefair_energ ...
_LOGGER.debug(hass.config.path("."))
18
334
2657
花落花空 发表于 2021-8-31 00:18 感谢大神的集成,之前用esphome读的培正,得自己搞月用电数据啥的。看到帖子试了下改成透传,很容易就成功 ...
involute 发表于 2021-9-2 21:14 看看呢
BH4WHN 发表于 2021-9-2 21:28 来了 2021-09-02 21:27:38 DEBUG (MainThread) [custom_components.peacefair_energy] protocol=rtuoveru ...
os.makedirs(hass.config.path(STORAGE_PATH), exist_ok=True)
os.makedirs(STORAGE_PATH, exist_ok=True)
本版积分规则 发表回复 回帖后跳转到最后一页
教程高产大神,简直就是为了教程而生~
长期对论坛的繁荣而不断努力,或多次提出建设性意见
Archiver|手机版|小黑屋|Hassbian
GMT+8, 2025-3-6 03:37 , Processed in 0.287148 second(s), 33 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.