Comments (12)
是字符数超了吗?有解决办法吗?
from heweather.
{"code":"200","updateTime":"2023-06-15T09:28+08:00","fxLink":"https://www.qweather.com/severe-weather/zhaoyuan-101120506.html","warning":[{"id":"10112050620230615062600469183110","sender":"山东省气象台","pubTime":"2023-06-15T06:26+08:00","title":"山东省气象台继续发布高温橙色预警","startTime":"2023-06-15T06:26+08:00","endTime":"2023-06-16T06:27+08:00","status":"update","level":"橙色","severity":"Severe","severityColor":"Orange","type":"1009","typeName":"高温","urgency":"","certainty":"","text":"山东省气象台于6月15日06时继续发布高温橙色预警:受大陆暖高压脊影响,15—17日我省将出现高温天气。其中,15—16日,内陆和北部沿海地区38℃左右,局部可达40℃,南部沿海地区23~27℃;17日,鲁西北和鲁中地区36~39℃,南部沿海地区23~27℃,其他地区32~35℃。","related":"10112050620230614161600772913906"},{"id":"10112050620230614160000815320172","sender":"招远市气象台","pubTime":"2023-06-14T16:00+08:00","title":"招远市气象台发布高温黄色预警[Ⅲ/较重]","startTime":"2023-06-14T16:00+08:00","endTime":"2023-06-17T16:02+08:00","status":"active","level":"黄色","severity":"Moderate","severityColor":"Yellow","type":"1009","typeName":"高温","urgency":"","certainty":"","text":"招远市气象台2023年06月14日16时00分发布高温黄色预警信号:受大陆暖高压脊影响,预计15~17日,我市全部镇街将出现高温天气,最高气温可达35℃以上,局部地区超过37℃。请注意防范高温天气对户外作业、城市生活等带来的不利影响。","related":""}],"refer":{"sources":["12379"],"license":["CC BY-SA 4.0"]}}
from heweather.
如果是state的字数不允许超过255,那有没有办法把自然灾害预警像彩云天气一样,写到属性里
from heweather.
经测试,一条的情况下加上标题也有可能超255字符,何况我这边今天看到的是两条信息,加起来有500多个字符了,肯定超了,我找了个一条的地区,然后加上标题也是超过255字符了,我这边在代码里把标题去掉了,可以正常显示
from heweather.
临时解决方案,不让他合并显示了,把标题去掉,添加了listall和listtitle两个列表,for循环时循环添加,然后取第一条(即最新发布的一条),还是希望大佬有时间的话尝试看能不能写到属性里,state里的最大长度确实是255,我这边删掉标题才勉强不超过255
加上标题的话280多个字符了,
from heweather.
from heweather.
from heweather.
大佬,我不会发合并,我看着属性里的unit_of_measurement没用,我就给写到unit_of_measurement里了,这个应该是计量单位,没什么用,具体的我发到您帖子最下方回复里了,如果您看有什么问题, 就再给优化下,然后可以发布个新版!
from heweather.
from heweather.
好的,感谢,我周末弄弄
from heweather.
天气翻译问题,升级到2023.6.2以后,就可以正常显示中文了
from heweather.
heweather/sensor.py
灾害预警长度问题已经修复,加了一个states属性,有灾害sensor状态会变成on,然后再去读states即可
from heweather.
Related Issues (18)
- 七日天气预报 无法使用 HOT 8
- 大佬,升级2023.6.0以后,实体全部不可用,如图 HOT 13
- 升级失效了,请大佬适配下 ha 2023.6.0之后运行出错 HOT 2
- WeatherEntity不能用了 HOT 2
- 大佬请问这个错误怎么解决?custom_components.heweather_forecast.weather::LocalWeather is overriding deprecated methods on an instance of WeatherEntity, this is not valid and will be unsupported from Home Assistant 2023.1. Please report it to the custom integration author. HOT 2
- 大佬,有考虑集成到HACS吗,否则很多人使用起来成本较大 HOT 9
- what can i do ? HOT 3
- 配置sensor时出错 HOT 2
- 有api马上要取消了 HOT 7
- 可不可以给名字加个前缀
- 升级 homeassistant core 2024.1.6后 heweather 实体不可用 HOT 1
- 配置 HOT 1
- 不支持 "textDay": "小到中雨" HOT 1
- Home Assistant 2023.6.0插件报错 HOT 2
- 大佬,升级2023.5.2以后,发现heweather 这个插件无法使用,日志里报错 HOT 20
- - guomin #过敏指数 - liangshai #晾晒指数 - fangshai #防晒指数 - kongtiao #空调指数 能否换成英文 HOT 2
- 安装问题 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heweather.