1
mirror of https://github.com/home-assistant/core synced 2024-10-01 05:30:36 +02:00
ha-core/tests/fixtures/geo_rss_events.xml
Malte Franken 0d75cd484b GeoRSS sensor (#9331)
* new geo rss events sensor

* SCAN_INTERVAL instead of DEFAULT_SCAN_INTERVAL

* removed redefinition CONF_SCAN_INTERVAL

* definition of self._name not required

* removed unnecessary check and unnecessary parameter

* changed log levels

* fixed default name not used

* streamlined sensor name and entity id generation, removed unnecessary parameter

* fixed issue for entries without geometry data

* fixed tests after code changes

* simplified code

* simplified code; removed unnecessary imports

* fixed invalid variable name

* shorter sensor name and in turn entity id

* increasing test coverage for previously untested code

* fixed indentation and variable usage

* simplified test code

* merged two similar tests

* fixed an issue if no data could be fetched from external service; added test case for this case
2017-09-24 08:12:38 +02:00

76 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:georss="http://www.georss.org/georss"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<channel>
<!-- Entry within vicinity of home coordinates - Point -->
<item>
<title>Title 1</title>
<description>Description 1</description>
<category>Category 1</category>
<pubDate>Sun, 30 Jul 2017 09:00:00 UTC</pubDate>
<guid>GUID 1</guid>
<georss:point>-32.916667 151.75</georss:point>
</item>
<!-- Entry within vicinity of home coordinates - Point -->
<item>
<title>Title 2</title>
<description>Description 2</description>
<category>Category 2</category>
<pubDate>Sun, 30 Jul 2017 09:05:00 GMT</pubDate>
<guid>GUID 2</guid>
<geo:long>148.601111</geo:long>
<geo:lat>-32.256944</geo:lat>
</item>
<!-- Entry within vicinity of home coordinates - Polygon -->
<item>
<title>Title 3</title>
<description>Description 3</description>
<category>Category 3</category>
<pubDate>Sun, 30 Jul 2017 09:05:00 GMT</pubDate>
<guid>GUID 3</guid>
<georss:polygon>
-33.283333 149.1
-33.2999997 149.1
-33.2999997 149.1166663888889
-33.283333 149.1166663888889
-33.283333 149.1
</georss:polygon>
</item>
<!-- Entry out of vicinity of home coordinates - Point -->
<item>
<title>Title 4</title>
<description>Description 4</description>
<category>Category 4</category>
<pubDate>Sun, 30 Jul 2017 09:15:00 GMT</pubDate>
<guid>GUID 4</guid>
<georss:point>52.518611 13.408333</georss:point>
</item>
<!-- Entry without coordinates -->
<item>
<title>Title 5</title>
<description>Description 5</description>
<category>Category 5</category>
<pubDate>Sun, 30 Jul 2017 09:20:00 GMT</pubDate>
<guid>GUID 5</guid>
</item>
<!-- Entry within vicinity of home coordinates -->
<!-- Link instead of GUID; updated instead of pubDate -->
<item>
<title>Title 6</title>
<description>Description 6</description>
<category>Category 6</category>
<updated>2017-07-30T09:25:00.000Z</updated>
<link>Link 6</link>
<georss:point>-33.75801 150.70544</georss:point>
</item>
<!-- Entry with unsupported geometry - Line -->
<item>
<title>Title 1</title>
<description>Description 1</description>
<category>Category 1</category>
<pubDate>Sun, 30 Jul 2017 09:00:00 UTC</pubDate>
<guid>GUID 1</guid>
<georss:line>45.256 -110.45 46.46 -109.48 43.84 -109.86</georss:line>
</item>
</channel>
</rss>