Is there integration of a weather biomet?

is there any integration in ha which displays what is the biomet on a given day or how to possibly download the biomet from an external weather site?

tried to download biomet from twojapogoda.pl using this integration, but the status is unknown all the time

and with this configuration

I only see a dash

Heya, when you share snippets do this rather with text then a screenshot.

Stole the text from the discord bot :wink:
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks. Here’s an example

Nearest I get is Zachodniopomorskie - Prognoza pogody | TwojaPogoda.pl - I do not plan to type off the polish text :stuck_out_tongue:

When its really json you could do better with a RESTful sensor. scraping can work. but it is really a pain to get working

I tried something like that but it doesn’t work either

- platform: rest
  name: biomet
  json_attributes:
   - json-biomet
  resource: https://www.twojapogoda.pl/prognoza-16dni-polska/zachodniopomorskie-szczecin/

So how can I download additional weather data from this site?

I spun up burp and zap. Somehow I came to the API

curl data.twojapogoda.pl/forecasts/city/daily/972/1 | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2374  100  2374    0     0  32081      0 --:--:-- --:--:-- --:--:-- 32081
{
  "city": {
    "id": 972,
    "name": "Szczecin",
    "zoom": 6,
    "lat": "53.42",
    "lng": "14.55",
    "abroad": false
  },
  "forecasts": [
    {
      "name": "Wtorek",
      "precip": "0",
      "pressmsl": 1026,
      "relhum": 42,
      "temp": 20,
      "temp_night": 11,
      "temp_feel": 20,
      "thermal": "ciepło i sucho",
      "biomet": 0,
      "wind_speed": 32,
      "wind_gusts": 55,
      "wind_sign": "ne",
      "wind_desc": "północno-wschodni",
      "sign": "sjhaa",
      "sign_desc": "zachmurzenie małe",
      "sign_size": "20-30%",
      "date": "24.08.2021"
    },
    {
      "name": "Ĺšroda",
      "precip": "0,1",
      "pressmsl": 1015,
      "relhum": 45,
      "temp": 22,
      "temp_night": 9,
      "temp_feel": 22,
      "thermal": "ciepło i mokro",
      "biomet": -1,
      "wind_speed": 31,
      "wind_gusts": 55,
      "wind_sign": "w",
      "wind_desc": "zachodni",
      "sign": "schmd",
      "sign_desc": "deszcz",
      "sign_size": "90%",
      "date": "25.08.2021"
    },
    {
      "name": "Czwartek",
      "precip": "6",
      "pressmsl": 1011,
      "relhum": 82,
      "temp": 14,
      "temp_night": 11,
      "temp_feel": 12,
      "thermal": "chłodno i mokro",
      "biomet": -1,
      "wind_speed": 26,
      "wind_gusts": 50,
      "wind_sign": "nw",
      "wind_desc": "północno-zachodni",
      "sign": "schmd",
      "sign_desc": "deszcz",
      "sign_size": "90%",
      "date": "26.08.2021"
    },
    {
      "name": "PiÄ…tek",
      "precip": "7",
      "pressmsl": 1011,
      "relhum": 76,
      "temp": 17,
      "temp_night": 11,
      "temp_feel": 16,
      "thermal": "ciepło i mokro",
      "biomet": -1,
      "wind_speed": 26,
      "wind_gusts": 50,
      "wind_sign": "n",
      "wind_desc": "północny",
      "sign": "schmdb",
      "sign_desc": "burza z deszczem",
      "sign_size": "90%",
      "date": "27.08.2021"
    },
    {
      "name": "Sobota",
      "precip": "4",
      "pressmsl": 1016,
      "relhum": 87,
      "temp": 16,
      "temp_night": 12,
      "temp_feel": 14,
      "thermal": "ciepło i mokro",
      "biomet": -1,
      "wind_speed": 25,
      "wind_gusts": 50,
      "wind_sign": "n",
      "wind_desc": "północny",
      "sign": "schmd",
      "sign_desc": "deszcz",
      "sign_size": "90%",
      "date": "28.08.2021"
    },
    {
      "name": "Niedziela",
      "precip": "11",
      "pressmsl": 1015,
      "relhum": 85,
      "temp": 16,
      "temp_night": 13,
      "temp_feel": 15,
      "thermal": "ciepło i mokro",
      "biomet": -1,
      "wind_speed": 25,
      "wind_gusts": 50,
      "wind_sign": "n",
      "wind_desc": "północny",
      "sign": "chd",
      "sign_desc": "deszcz",
      "sign_size": "100%",
      "date": "29.08.2021"
    }
  ],
  "calendar": {
    "sun": {
      "rise": "05:55",
      "zenith": "13:04",
      "set": "20:13"
    },
    "moon": {
      "rise": "21:07",
      "set": "06:32",
      "phases": [
        {
          "phase": 30,
          "phase_desc": "pełnia",
          "date": "23 sierpnia 2021, 19:00"
        }
      ]
    },
    "day": {
      "name": "Poniedziałek",
      "length": "14h 18min",
      "number": 235,
      "left": 130
    },
    "night": {
      "length": "9h 43min"
    },
    "date": {
      "date": "23 sierpnia 2021",
      "nameday": "Filipa, Apolinarego, Róży, Sulirada"
    }
  },
  "page": {
    "current": 1,
    "last": 3
  }
}

In there the stuff you looking for?

1 Like

thanks for the help I know after I found the “biomet” that interests me and I would like the sensor to be updated more often than once a day, so I changed the address to the hourly one.So whether to download a biomet every hour from this address https://data.twojapogoda.pl/forecasts/city/hourly/972/1 I need to make some templates or something like that?

good find!
Check the cetus sensor. it’s basically the same from here. ( query a json api and filter out stuff )
set the scan_interval: to something that soutes you and you should be golden.
Let me know when you are stuck.

I made up something like that

- platform: rest
  name: biomet
  json_attributes:
    -biomet
  value_template: '{{ value_json.biomet.shortString }}'
  resource: https://data.twojapogoda.pl/forecasts/city/hourly/972/1
  scan_interval: 60

and in development tools I have the status as unknown and if I add something like this

- platform: template
  sensors:
    biomet2:
      value_template: '{{ states.sensor.biomet_string.attributes.forecast.biomet }}'

then I have the status as unavailable

- platform: rest
  name: biomet
  value_template: '{{ value_json.forecasts[0].biomet }}'
  resource: https://data.twojapogoda.pl/forecasts/city/hourly/972/1
  scan_interval: 60

with text values:

- platform: rest
  name: biomet
  value_template: '{{ {-1:"niekorzystny", 0: "neutralny", 1: "korzystny"}[value_json.forecasts[0].biomet | int] }}'
  resource: https://data.twojapogoda.pl/forecasts/city/hourly/972/1
  scan_interval: 60
1 Like