Skip to content
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

中枢网关虚拟事件中虚拟事件的key为中文[事件名称] #321

Open
MakeDreamer opened this issue Dec 21, 2024 · 3 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@MakeDreamer
Copy link

Describe the Bug / 描述问题

虚拟事件产生的事件名称为中文,与其他key格式不一致,在node-red中获取事件的名称获取不到

How to Reproduce / 复现步骤

虚拟事件产生的事件名称为中文,与其他key格式不一致,在node-red中获取事件的名称获取不到;
image
1、从msg中获取获取最新的attributes,并赋值到msg中
image
2、在debug中获取attributes.事件名称,获取不到,为undefined,中文的key影响取值判断
image

Expected Behavior / 预期结果

修改虚拟事件的名称为英文key

Home Assistant Logs / 系统日志

No response

Home Assistant Core Version / Home Assistant Core 版本

2024.12.5

Home Assistant Operation System Version / Home Assistant Operation System 版本

14.1

Xiaomi Home Integration Version / 米家集成版本

v0.1.3

Additional Context / 其他说明

No response

@topsworld topsworld self-assigned this Dec 21, 2024
@topsworld topsworld added the enhancement New feature or request label Dec 21, 2024
@DyAxy
Copy link

DyAxy commented Dec 21, 2024

.事件名称 换成 ["事件名称"] 就好了

@MakeDreamer
Copy link
Author

.事件名称 换成 ["事件名称"] 就好了
Duplicate of #
试了一下不行,这个是根据键取里面的值,应该和HA里面的还是有点差异的。
image

@DyAxy
Copy link

DyAxy commented Dec 21, 2024

.事件名称 换成 ["事件名称"] 就好了
Duplicate of #
试了一下不行,这个是根据键取里面的值,应该和HA里面的还是有点差异的。
image

你的 [ 的前面有 . 当然是不行咯。
去掉就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants