SMHI Component (swedish weather service)

The swedish weather service have a open API but my programming skills are not near good enough to make a component for it. Hoping that someone that reads this might give it a go! :smiley:
http://opendata.smhi.se/apidocs/metfcst/index.html

Bara lĂ€gga till med i ‘Integrations\Set up a new integration’ med long & lat sĂ„ dyker den upp i HA. Dvs om du kör 0.8.1 iaf
Sk%C3%A4rmklipp

Yup, har redan lagt till den?

Är du Helto?

Does not work any more after upgrade to 0.84.2.

Cheers

Kim

Hi Kim
To bad but it works fine for me with 0.84.3, both lovelace and ‘old’ gui.

/LA

Hi!

I’m on 0.86.4

SMHI only works with the States UI, when I switch to Lovelace it does not show anything when I add it to the GUI.

Well, I have to admit that I was using Edge on my work computer. There the weather card did not work in Lovelace. But once I got home and browsed in from my home computer using Chrome the SMHI card was back in Lovelace


Is it possible to change the language for the SMHI API?

In the SMHI API there’s a parameter “tstm” - Thunder probability.

I cant see this value in HA, maybe Im looking in the wrong place


But if it was avalible you could use it for a thunder warning system. It would probably be more reliable then the solution I have in place right now. Working on a AppDaemon app for a better solution, but Im kinda new so it goes very slow. See bad code below for thunder_sensor.

Is there anyone who could include this value into the normal HA integration if it isnt there already?

Thunder_sensor code(change X and Y to log/lat with three decimals to get it to work:

sensor:
  - platform: rest
    resource: "https://opendata-download-metfcst.smhi.se/api/category/pmp3g/version/2/geotype/point/lon/X/lat/Y/data.json"
    name: thunder_sensor
    authentication: basic
    headers:
      User-Agent: Home Assistant
      Content-Type: application/json
    scan_interval: 1800
    value_template: '{{ value_json.timeSeries[0]["parameters"][16]["values"][0] }}'
    unit_of_measurement: " % "

This goes into configuration.yaml

//Hagalund

Similar to the above, I noticed that the SMHI integration doesn’t include a couple of useful attributes avaliable through the SMHI API. I’m using wind values as part of my awning automation and would be exited to have the following included.

  • Wind gust speed
  • Mean value of total cloud cover

Could someone with the proper skills include this in the SMHI integration I would be grateful!