jcconnell/python-magicseaweed

Not getting Swell direction attribute

Closed this issue · 5 comments

I'm not receiving the swell direction attribute. The only attributes I have showing are:

for the breaking min/max sensors

air_pressure: 1016mb
air_temp: 22° c
stars: 0 solid, 0 faded
begins: Tue 12 PM
issued: Mon 6 PM
max_breaking_height: 0.2 m
min_breaking_height: 0.1 m
probability: 95%
swell_period: 5 seconds
wind_chill: 17°
wind_direction: 219° NE
wind_gusts: 41 kph
wind_speed: 33 kph
unit_of_measurement: m

for the forecast sensor

12PM: 0.1 - 0.2 m
3PM: 0.2 - 0.3 m
6PM: 0.2 - 0.3 m
9PM: 0.2 - 0.3 m
12AM: 0.2 - 0.3 m
3AM: 0.3 - 0.5 m
6AM: 0.3 - 0.4 m
9AM: 0.3 - 0.4 m
unit_of_measurement: m

when I look at my API through a browser there is definitely swell direction information there for whatever reason though it is not being displayed.

It was left out intentionally. Which would be more valuable, the compass direction, the degrees or a combination of the two?

Thanks for getting back to me so quickly, Compass direction would be fine

No problem, happy to help! I've updated the code to include Compass Direction as a part of the attributes dictionary.

I'm assuming you're using this in Home Assistant. I'll submit a PR there and hopefully it will be included in the next release.

EDIT: PR created in the Home Assistant repo here: home-assistant/core#18446

Merged into Home Assistant.

Thanks mate appreciate it