I made an improved NOAA Tides sensor for my family's summer house

Is this integration still working for everyone? I’m still getting the water temp data, but no longer receiving tide information into the integration.

Still works for me. Tide info comes from the bouy. Doesn’t always work

It’s still working here too. I use a tide station for tides, not buoys. I’ve found the NOAA servers aren’t always reliable, especially the buoy data, where I’ve seen long outages from time to time.

Best bet is to go on their web site and see if there’s any data available, before troubleshooting the HA integration.

Yeah, started working again without any changes on my end. Must have just been down on their end.

Beta 2025.1 has been released today and the integration is now broken.

Logger: homeassistant.util.loop
Source: util/loop.py:136
First occurred: 2:34:55 PM (1 occurrences)
Last logged: 2:34:55 PM

Detected blocking call to import_module with args (‘custom_components.noaa_tides.sensor’,) inside the event loop by integration ‘homeassistant’ at homeassistant/components/homeassistant/init.py, line 350: if errors := await conf_util.async_check_ha_config_file(hass): (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1304: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at Issues · home-assistant/core · GitHub For developers, please see Blocking operations with asyncio | Home Assistant Developer Docs Traceback (most recent call last): File “”, line 198, in _run_module_as_main File “”, line 88, in _run_code File “/usr/src/homeassistant/homeassistant/main.py”, line 227, in sys.exit(main()) File “/usr/src/homeassistant/homeassistant/main.py”, line 213, in main exit_code = runner.run(runtime_conf) File “/usr/src/homeassistant/homeassistant/runner.py”, line 154, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File “/usr/local/lib/python3.13/asyncio/base_events.py”, line 707, in run_until_complete self.run_forever() File “/usr/local/lib/python3.13/asyncio/base_events.py”, line 678, in run_forever self._run_once() File “/usr/local/lib/python3.13/asyncio/base_events.py”, line 2033, in _run_once handle._run() File “/usr/local/lib/python3.13/asyncio/events.py”, line 89, in _run self._context.run(self._callback, *self._args) File “/usr/src/homeassistant/homeassistant/components/homeassistant/init.py”, line 350, in async_handle_reload_all if errors := await conf_util.async_check_ha_config_file(hass):

Have you completed a bug report? If not, please do or let me know and I will do it. Thanks

I did and it has now been fixed.

1 Like

This improved sensor is a nice improvement compared to the base noaa sensor, however I am confused on how the ‘tide factor’ attribute is being generated. According to a prior post: " the tide_factor is a percentage between low (0%) and high (100%) tides. Combine that with the high_tide_level attribute and you’ll know the height of your high tide."…Hmm, well I’m trying to figure out exactly how this math should be used. For example - there are many places the real world where there may be significantly negative low tide water levels, and very large high tide water levels (think anywhere in Cook Inlet, Alaska) and the prior posts answer is pretty darn insufficient. I think a better answer would be 'what is the math used that generates the ‘tide_factor’ number. That way anybody can back calculate the actual water level at the ‘current time’.

So, does anybody know how the ‘tide_factor’ attribute is calculated? I have no real world use for a percentage of where the current water level may be…only what is the actual water level right now…and as a bonus, what is the increase/decrease in the water level per hour…That way I can know things like “can I get over the gravel bar in my skiff in 1/2 hour…or can i get under the harbor ramp with my boat in 1 hour, or do i have to wait for the tide to fall enough”…

Thanks,

I loved “old school” tide clocks. An old school tide clock is just a dial that shows the tide level on an analog clock face. Like this one I made using the Home Assistant NOAA Tide sensor and ESPHome.

All I did want come up with a percentage and map it to the clock face. I realize the time between high tide and low tide is not exactly 6 hours but this dial helps to quickly visualize where we are in the tide cycle.

This is the changes I needed

I need the “last tide” level and time and also the “next tide” level and time to build this display. Then I need the percentage between the last and next. Non of this was available in the original NOAA plugin.

I would also be interesting to have the “present tide Hight”. This would be very useful for “can I get over the gravel bar in my skiff in 1/2 hour” type calculations!!

Ok, I decided to take a look at the python code for determining the math behind the ‘tide_factor’ computation…It appears to compute this from assuming the water elevation follows a perfect sinusoidal shape over time between the last high/low and the next high/low. Not a bad assumption, and should give pretty good results…so based on this information, I am going to do the math ‘current water elev’ = ‘last high/low predicted water elev’ +/- ‘tide_factor’ * (‘absolute difference in elev between next high/low predicted water elev’ and ‘next high/low predicted water elev’)…Then I’m going to check this against both the actual ‘current’ water elevation at a few sample NOAA tidal sites AND the results from running the old ‘xtide’ program…I’m curious to see which model results in the closest to the actual tidal gauge water level measurements…

And if the author Jacob Shufro is monitoring this thread, may I suggest that adding an attribute that contains the ‘elevation change per time period’ would be useful, eg 1.2 feet/hr. Essentially the current instantaneous slope at the time ‘now’ of the assumed sinusoidal curve - which is nothing more than the derivative of the sinusoidal function at that point…

Never mind. This add-on is too limited for my needs on what information is included in the attributes. It appears that this is due to the limited information returned by the NOAA website query.

So I am going a different route…I’ve have used xtide since about 15 years ago, and know that the info I want can be generated by this program…Just spent about 10 minutes asking my favorite ai to write me a python program that periodically runs xtide to produce the next high/low tide predicted time and elevation AND the computed current water elevation AND the current rate of water level change - and publishing this information to a MQTT broker…Asked the ai to refine the program 4 times…and the total time I spent doing this was about 10 minutes…And it is trivial to get this MQTT data into home assistant in the form of sensors…

Nice! any chance you want to post that code someplace?