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

Thank you I am going into it right now.

Sometime around when I updated to core-2021.6.2, this stopped working for me.

Specifically, when I look at sensor.tides in Developer Tools, there is no “next_tide_type”, only this:

attribution: Data provided by NOAA
low_tide_time: 2021-06-09T17:53
low_tide_height: 1.19
high_tide_time: 2021-06-10T00:16
high_tide_height: 8.001
friendly_name: tides

I’m not sure if this started with the last core update, or if something changed on the NOAA side.

Anyone else seeing this?

Still works for me.

2021.6.1 definitely breaks it for me. Works again if you roll back to 2021.5.5.

Log spits out Invalid config for the sensors…complaining that ‘type’ is an invalid option in the yaml config. Not sure what changed between 2021.6.1 & 2021.5.5 that ‘type’ would be considered no longer valid, but it seems highly relevant to the setup and think it should still be valid.

You may need to edit the manifest Json file. This a requirement for all custom components. Not sure if I changed mine or if there was an update by Jacob?
From another post:
If you are not the maintainer of the integration and this is missing, please report that to the maintainer of it, while you wait for the maintainer to implement it, you can just add "version": "1.2.3" to the manifest.json file yourself. use https://jsonlint.com/ to make sure it’s valid JSON before restarting.

1 Like

Yes, thank you. That was it.

FYI: anyone else, any version number works as long as the version key is present in the manifest.json file.

1 Like

Adding “version”: “1.2.3” to manifest.json cleared up that error. But it’s still not giving me any data.

This might be the problem. In an earlier version, HA Core logged that “type” was deprecated, so I removed it from configuration.yaml. I thought the integration was still working afterward, but I might not have adequately validated the data. It could have been failing and I didn’t notice that the data was old.

I looked in Developer Tools / States for the two noaa_tides entities I was using to retrieve buoy data (used to be type: buoy in config). The entity isn’t even listed.

Then I looked at the noaa_tides entity I had for the local tide (type: tides in config.) There is some current data there but the two attributes I had been using, next_tide_type and next_tide_time, are missing.

Could it be that for whatever reason, HA is prohibiting the use of “type:” but the integration requires it?

Updating the manifest.json file cleared the invalid type msg I was seeing and returned the integration to expected behavior. …though that doesn’t fully explain the error msg that was received. I am currently using type: tides in my config and next_tide_type & next_tide_time are retreiving data on my end. Maybe the station_id you are using has stopped reporting that data? I was pulling water temp and had to switch buoys a while back b/c the one I originally was using stopped reporting it.

Hi All-

Sorry for the delay here. My own home assistant install has been AWOL for a few months because the gateway at my family’s summer house went down and I didn’t feel like making the 2-hour drive to fix it.

It looks like home assistant core did introduce a requirement for a new version field in the manifest. They added warning messages saying the custom integration would eventually stop working, but because I haven’t been using home assistant, I didn’t see any of the warnings.

I’m tagging version 0.1.3 now. It will be available on the release page and via git pull in a moment.

Thank you!

What about the “type:” setting? Are we supposed to remove that or not?

I’m still getting no or limited data (depending on the type; see above.)

Update: I tried adding the type: setting back and did a configuration check. Still getting errors like the following:

Invalid config for [sensor.noaa_tides]: [type] is an invalid option for [sensor.noaa_tides]. Check: sensor.noaa_tides->type. (See ?, line ?).

@CaptTom My guess is that your instance is still blocking the custom component from loading… please make sure you’ve updated it, and it is in the right path.

I believe the error is because you’re using a configuration block for my library, but the default one is loading. The default one doesn’t have a “type” field, so you would see that error.

Makes sense. But I don’t know of anything I may have done to change it. Also note that someone else reported the same thing, above. How would I know if its using the default component?

Update: OK, restarted Core and now it’s working, with the “type:” entry included. No clue why it switched to the default component before. Anyway, thank you for all the help!!

1 Like

Hi All - Any idea what I may have done incorrectly? Everything was followed in the ReadMe

Invalid config for [sensor.noaa_tides]: required key not provided @ data[‘type’]. Got None. (See /config/configuration.yaml, line 42).

2:30:56 PM – (ERROR) config.py

Neaver Mind! I did not comment out the original NOAA config. All is good and working

1 Like

I’m getting the error about “type” after following the instructions. Anyone know how to resolve this?

Invalid config for [sensor.noaa_tides]: [type] is an invalid option for [sensor.noaa_tides]. Check: sensor.noaa_tides->type. (See ?, line ?).

This is usually a sign that the plugin isn’t correctly installed in your custom_components directory

Edit: or, as above, you have a config block for the standard noaa_tides sensor that conflicts with the custom one

Thanks for the help @jshufro !

I usually copy the whole custom component folder over, but for this I had to just copy the “noaa_tides” sub-folder.

1 Like

I just updated to 2022.3.5 (from 2022.2.9) and I’m getting log messages like this:

2022-03-19 14:51:32 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.tides (<class 'custom_components.noaa_tides.sensor.NOAATidesAndCurrentsSensor'>) implements device_state_attributes. Please report it to the custom component author.

I’m seeing three log entries, this one and two others for the two buoy sensors I’ve defined.

I have the same info in my logs.

It is just a warning as home assistant changed the function name. The author of the integration should change replace device_state_attributes with extra_state_attributes. on line 116 of sensor.py . If it bothers you that much, you can edit you version in \config\custom_components\noaa_tides\sensor.py

1 Like