Closed Dinth closed 5 years ago
Just wanted to add that all other attributes here work fine. I have also tried changing {{ states.binary_sensor.meteoalarm.attributes.description | string }} to {{ state_attr("binary_sensor.meteoalarm", "description") | string }}' and im seeing exactly same behaviour
Here's the original XML from meteoalarm website:
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="http://meteoalarm.eu/documents/rss/uk/UK012.rss" rel="self" type="application/rss+xml"/>
<title>Meteoalarm United Kingdom, East of England</title>
<link>https://www.meteoalarm.eu/en_UK/0/0/UK012.html</link>
<description>Metoalarm actual warnings from United Kingdom, East of England</description>
<ttl>10</ttl>
<language>eng</language>
<item>
<title>East of England</title>
<link>https://www.meteoalarm.eu/en_UK/0/0/UK012.html</link>
<description><![CDATA[<table border="0" cellspacing="0" cellpadding="3"><tr><th colspan="3" align="left">Today</th></tr><tr><td width="28"><img border="1" src="https://www.meteoalarm.eu/documents/rss/wflag-l2-t3.jpg" alt="awt:3 level:2"></td><td><b>From: </b><i>30.07.2019 04:00 CET</i><b> Until: </b><i>31.07.2019 01:00 CET</i></td></tr><tr><td width="28"></td><td>Thunderstorms bring a chance of flooding in places along with possible travel disruption. There is a small chance that homes and businesses could be flooded quickly, with damage to some buildings from floodwater, lightning strikes, hail or strong winds. There is a small chance of fast flowing or deep floodwater causing danger to life. Where flooding or lightning strikes occur, there is a chance of delays and some cancellations to train and bus services. Spray and sudden flooding could lead to difficult driving conditions and some road closures. There is a slight chance that power cuts could occur and other services to some homes and businesses could be lost.</td></tr><tr><th colspan="3" align="left"><br />Tomorrow</th></tr><tr><td width="28"><img border="1" src="https://www.meteoalarm.eu/documents/rss/wflag-l2-t10.jpg" alt="awt:10 level:2"></td><td><b>From: </b><i>31.07.2019 01:00 CET</i><b> Until: </b><i>01.08.2019 01:00 CET</i></td></tr><tr><td width="28"></td><td>Heavy rain and some thunderstorms bringing a chance of flooding and travel disruption. Spray and flooding could lead to difficult driving conditions and some road closures. Delays or cancellations to train and bus services are possible. Some communities may be cut off by flooded roads. Homes and businesses could be flooded, causing damage to some buildings. Possible power cuts due to flooding or lightning. There is a slight chance that power cuts could occur and other services to some homes and businesses could be lost</td></tr><tr><td width="28"><img border="1" src="https://www.meteoalarm.eu/documents/rss/wflag-l2-t3.jpg" alt="awt:3 level:2"></td><td><b>From: </b><i>30.07.2019 04:00 CET</i><b> Until: </b><i>31.07.2019 01:00 CET</i></td></tr><tr><td width="28"></td><td>Thunderstorms bring a chance of flooding in places along with possible travel disruption. There is a small chance that homes and businesses could be flooded quickly, with damage to some buildings from floodwater, lightning strikes, hail or strong winds. There is a small chance of fast flowing or deep floodwater causing danger to life. Where flooding or lightning strikes occur, there is a chance of delays and some cancellations to train and bus services. Spray and sudden flooding could lead to difficult driving conditions and some road closures. There is a slight chance that power cuts could occur and other services to some homes and businesses could be lost.</td></tr></table>]]></description>
<pubDate>Tue, 30 Jul 2019 11:42:02 +0200</pubDate>
<guid isPermaLink="false">de4ef86dec2f2b4e5cc73b7c20109d3e</guid>
</item>
</channel>
</rss>```
Actually i just realised that description is longer than 255 characters. Truncating it to 250 fixes the issue.
Home Assistant release with the issue:
0.96.5
Operating environment (Hass.io/Docker/Windows/etc.):
Hass in Docker
Component/platform:
template sensor
Description of problem:
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Additional information: "{{ states.binary_sensor.meteoalarm.attributes.description | string }}" works perfectly fine in "Templates" tab of Developer Tools, but if copied and pasted into value_template: field of template sensor, the sensor's value becomes "unknown"
Here are all binary_sensor.meteoalarm attributes: