|
本帖最后由 mobility 于 2023-5-10 16:16 编辑
template:
- sensor:
- name: "IFoN"
unique_id: "timerifon"
state: >
{{(as_timestamp(strptime([now().date()," 8:30:00"]|join,"%Y-%m-%d %H:%M:%S"))-
as_timestamp([now().date()," ",now().hour,":",now().minute,":",now().second]|join)) % (60*90)==0}}
- name: "IFoFF"
unique_id: "timerifoff"
state: >
{{(as_timestamp(strptime([now().date()," 9:00:00"]|join,"%Y-%m-%d %H:%M:%S"))-
as_timestamp([now().date()," ",now().hour,":",now().minute,":",now().second]|join)) % (60*90)==0}}
原本很 会在 很准确的时间,开启 和 关闭的,现在不行了。难道是 我的 docker的宿主机 性能 的 问题吗?
以前正常
现在变得没规律了
|
|