# 由「今日詩詞 一言API」取得每日一句, 每59分鐘更新一次 URL: https://www.jinrishici.com/
- platform: rest
name: 每日诗词
method: GET
resource: https://v2.jinrishici.com/sentence
headers:
Content-Type: application/json
X-User-Token: WqXGyIN/PkGTEHsvCIO
value_template: '{{value_json["data"]["id"]}}'
json_attributes_path: $.data
json_attributes:
- id
- content
- origin
- warning
scan_interval: 3540
#每日英语
- platform: rest
name: daily_english
resource: http://open.iciba.com/dsapi
value_template: >-
{% if value_json.dateline == states("sensor.date") -%}
有效
{% else %}
无效
{% endif %}
scan_interval: 10800
json_attributes:
- content
- note
- picture
- tts
貌似会跟每日诗词 代码有冲突???这个加上之后诗词失效了··· |