Deconz-rest-plugin: 安排时间不能随机

创建于 2020-07-20  ·  4评论  ·  资料来源: dresden-elektronik/deconz-rest-plugin

功能请求类型


使用 REST API 创建计划时,时间不能随机化。

描述


使用以下正文向/api/<username>/schedules发送 POST 请求:

{
    "name": "SOn_28_Schedule 1_JbUwF",
    "description": "28",
    "localtime": "2020-07-20T19:30:00A00:10:00",
    "time": "2020-07-20T19:30:00A00:10:00",
    "command": {
        "address": "/api/<username>/groups/28/scenes/4/recall",
        "method": "PUT",
        "body": {}
    },
    "status": "enabled",
    "autodelete": false,
    "recycle": false
}

请求应该是成功的。 但是,(本地)时间( A00:10:00 )的随机部分被忽略。 这可以在源代码中看到:

https://github.com/dresden-elektronik/deconz-rest-plugin/blob/4154ad416996058bda9ab2d1af622fe5bef45cec/rest_schedules.cpp#L417 -L425
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/4154ad416996058bda9ab2d1af622fe5bef45cec/rest_schedules.cpp#L833 -L841

附加上下文


Hue API 支持随机计划。
该问题最初在此处报告: https :

Backlog Feature Request

所有4条评论

添加积压,否则机器人会再次打扰您。

下一个 deCONZ 测试版将提供随机时间。

谢谢@ChrisHae ,太棒了! 准备好后可以链接 PR 吗?

它已经在 master 分支中,也应该在最新的 deCONZ v.2.05.80 版本中
https://github.com/dresden-elektronik/deconz-rest-plugin/commit/8009689e5378749311db150a8d722885d961d4f1

此页面是否有帮助?
0 / 5 - 0 等级