jshufro / home_assistant_noaa_tides

A fork of Home Assistant's NOAA Tides sensor with additional features.
23 stars 4 forks source link

Station name and ID returned attributes #1

Open deepcoder opened 4 years ago

deepcoder commented 4 years ago

I'm sure there has to be a better way to accomplish this than what I show below. Neither the original or your code seem to return the name and ID of the reporting station. Since you can have multiple or need different stations if water temperature not reported at your nearest station. Recording the source of the data may be useful:

    attr["station_name"] = self._station.metadata['name']
    attr["station_id"] = self._station.metadata['id']
jshufro commented 4 years ago

Seems like it would make a nice improvement. You can differentiate data returned by distinct stations already if you supply a name attribute in your configuration, but it would be nice to surface the values returned by the NOAA as well.