Giter Site home page Giter Site logo

hf_weather's Introduction

hf_weather

一个不知道改了几手的和风天气最简单的配置版本

hacs_badge hacs_badge visit

使用方式

安装完成重启HA,刷新一下页面,在集成里搜索和风天气即可

Add Integration

注意:请自行申请appkey: https://wx.jdcloud.com/market/datas/26/10610

Lovelace配置

type: 'custom:hf_weather-card'
entity: weather.tian_qi

# 不设置则同时显示
mode: hourly按小时天气预报、daily按天天气预报

# 不设置则使用entity的friendly_name
title: 卡片标题

TTS语音提醒模板

data:
  message: >-
    {% set state = state_attr('weather.tian_qi', 'forecast')%}
    今天的天气是{{state[0].condition_cn}},最高温度:{{state[0].temperature}}度,最低温度:{{state[0].templow}}度,
    明天的天气是{{state[1].condition_cn}},最高温度:{{state[1].temperature}}度,最低温度:{{state[1].templow}}度,
    后天的天气是{{state[2].condition_cn}},最高温度:{{state[2].temperature}}度,最低温度:{{state[2].templow}}度
service: ha_cloud_music.tts
data:
  message: >-
    {% set state = state_attr('weather.tian_qi', 'hourly_forecast')%}
    {{state[0].datetime | regex_replace(now().strftime('%Y-%m-%d'), '')}}
    的天气是{{state[0].condition_cn}},温度是{{state[0].temperature}}度,
    {{state[1].datetime | regex_replace(now().strftime('%Y-%m-%d'), '')}}
    的天气是{{state[1].condition_cn}},温度是{{state[1].temperature}}度,
    {{state[2].datetime | regex_replace(now().strftime('%Y-%m-%d'), '')}}
    的天气是{{state[2].condition_cn}},温度是{{state[2].temperature}}度
service: ha_cloud_music.tts

如果这个项目对你有帮助,请我喝杯咖啡奶茶吧😘

支付宝 微信
支付宝 微信支付

关注我的微信订阅号,了解更多HomeAssistant相关知识

HomeAssistant家庭助理


在使用的过程之中,如果遇到无法解决的问题,付费咨询请加Q635147515

hf_weather's People

Contributors

shaonianzhentan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.