郑州艾特网站建设公司,搜外友链平台,php网站开发怎么样,企业网站建设售后服务内容先看效果
步骤#xff1a;
新建卡片时选择“Markdown 卡片”代码在文章最下方#xff0c;当然你也可以自己修改 点击保存/完成
### {% if now().hour 6 and now().hour 9 -%}
早上好#xff0c;
{%- elif now().hour 9 and now().hour 12 -%}
上午好…先看效果
步骤
新建卡片时选择“Markdown 卡片”代码在文章最下方当然你也可以自己修改 点击保存/完成
### {% if now().hour 6 and now().hour 9 -%}
早上好
{%- elif now().hour 9 and now().hour 12 -%}
上午好
{%- elif now().hour 12 and now().hour 13 -%}
中午好
{%- elif now().hour 13 and now().hour 18 -%}
下午好
{%- elif now().hour 18 and now().hour 23 -%}
晚上好
{%- else -%}
夜深了请注意休息哦
{%- endif %} {{user}},今天是{{now().strftime(%Y-%m-%d)}}{% set stop_time as_timestamp(state_attr(calendar.zhong_guo, start_time)) - as_timestamp(now()) %}
{% set days (stop_time // (60 * 60 * 24)) %}
{% set hours (stop_time// (60 * 60)) - days * 24 %}
{% set minutes (stop_time // 60) - (days * 24 * 60) %}
{% set days ((stop_time // (60 * 60 * 24))) %}
{% set minutes (minutes) - (hours * 60) %}
{% macro phrase(value, name) %}{%- set value value | int %}{{-{}{}.format(value,name) if value | int 0 else}}
{%- endmacro %}
{% set text [ phrase(days,天), phrase(hours,小时), phrase(minutes,分钟) ] | select(!,) | list | join() %}
### 距离{{state_attr(calendar.zhong_guo, message)}}还有{{text}}