Giter VIP home page Giter VIP logo

tides's People

Contributors

rianoc avatar

Stargazers

 avatar  avatar

Watchers

 avatar

tides's Issues

Error in HA when only one High Tide for Location

Hi

Seems some locations in https://tidetimes.org.uk/ only offer one High (and Low I guess) tide per day. Not sure if this is caused by timing of the actual tide or an issue with their platform. Either way it throws an error in HA as below because the second High Tide cannot be read.

Location I've seen this happening for is https://tidetimes.org.uk/balbriggan-tide-times which seems to have either two Highs with no Lows or some other combination, but at all times only two times there?

I've circumvented by using another location and all seems OK so just throwing it out there in case you wanted to have a look.........

2021-12-17 02:35:48 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform tides
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 613, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 541, in _async_write_ha_state
    extra_state_attributes = self.extra_state_attributes
  File "/config/custom_components/tides/sensor.py", line 71, in extra_state_attributes
    attr["high_tide_2_time"] = self.data[2][1]
IndexError: list index out of range

Here's the current RSS info for that location

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>Balbriggan Tide Times</title>
	<link>https://www.tidetimes.org.uk/balbriggan-tide-times</link>
	<description>Balbriggan tide times.</description>
	<lastBuildDate>Fri, 17 Dec 2021 00:00:00 GMT</lastBuildDate>
	<language>en-gb</language>
	<atom:link href="https://www.tidetimes.org.uk/balbriggan-tide-times.rss" rel="self" type="application/rss+xml"/>
	<item>
		<title>Balbriggan Tide Times for 17th December 2021</title>
		<link>https://www.tidetimes.org.uk/balbriggan-tide-times</link>
		<guid>https://www.tidetimes.org.uk/balbriggan-tide-times</guid>
		<pubDate>Fri, 17 Dec 2021 00:00:00 GMT</pubDate>
		<description>&lt;a href=&quot;https://www.tidetimes.org.uk&quot; title=&quot;tide times&quot;&gt;Tide Times&lt;/a&gt; &amp;amp; Heights for &lt;a href=&quot;https://www.tidetimes.org.uk/balbriggan-tide-times&quot; title=&quot;Balbriggan tide times&quot;&gt;Balbriggan&lt;/a&gt; on 17th December 2021&lt;br/&gt;&lt;br/&gt;10:20 - High Tide &#x28;4.1m&#x29;&lt;br/&gt;22:31 - High Tide &#x28;3.99m&#x29;&lt;br/&gt;</description>
	</item>
</channel>
</rss>

Can this work with Hassio ?

This looks amazing and would love to have it implemented on my instance of HomeAssistant. However, would or could this work with Hassio (i.e. the self contained OS + Home Assistant Core) ? I don't think its possible to install "pip" ?

Display Attributes in sensor tile

Hi,

Is there a way I can have the attributes displayed as part of the tile

image

I'd love to have the next low and high tides displayed

Thanks!

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.