2024年5月15日 5:47:39

workday

3 个月 前
#28505 引用
workday

官方有workday集成:
https://www.home-assistant.io/integrations/workday/

执行节假日或工作日自动化

it uses the Python module holidays
https://pypi.org/project/holidays/
0
3 个月 前
#28506 引用
官方workday集成:
https://www.home-assistant.io/integrations/workday/

现在有人往这个库里面加上中国大陆了,但是调休状况无法判断,只能判断节日当天以及春节、国庆这种固定往后放 7 天的

离线版法定节假日
0
3 个月 前
#28507 引用
automation:
  alias: "Turn on heater on workdays"
  trigger:
    platform: time
    at: "08:00:00"
  condition:
    condition: state
    entity_id: binary_sensor.workday_sensor
    state: "on"
  action:
    service: switch.turn_on
    target:
      entity_id: switch.heater
0
2 周 前
#33044 引用
离线版法定节假日

原理是每周在https://timor.tech/查询一次当年和次年的所有节假日,然后把所有数据存在内存和硬盘中。这样就算断网也可正常使用。
同时尽量减轻API的http访问压力。
硬盘存储版本(会在本地硬盘生成一个/config/holiday.json文件

https://timor.tech/api/holiday/
0