zigul/HomeAssistant-CEZdistribuce

New URL from where to get info

Closed this issue · 4 comments

Hello, so today at about 10:50 the sensor became N/A. I have looked for whats the issue and it seems like CEZ distribuce moved their data to new URL and discontinued the original. Can you please fix that?

Old url: https://www.cezdistribuce.cz/pro-zakazniky/spinani-hdo
New url: https://www.cezdistribuce.cz/pro-zakazniky/potrebuji-vyresit/stavajici-pripojeni/casy-spinani-nizkeho-tarifu

I am still new to HA and I want to thank you so much, this integration saved me a lot of money and I want to use it further...

Jirka

zigul commented

I will look at it next weekend.

tkupka commented

It's possible for concrete EAN: https://dip.cezdistribuce.cz/irj/portal/anonymous/casy-spinani?path=switch-times/signals

{"ean":"123456"}

or with graphQL: https://www.cezdistribuce.cz/api/graphql

[
  {
    "operationName": "hdoData",
    "variables": {
      "code": "A1B6DP1",
      "area": "stred"
    },
    "query": "query hdoData($code: String, $area: String) {\n  hdoData(code: $code, area: $area) {\n    result {\n      description\n      kod\n      kod_povelu\n      povel\n      timelines {\n        description\n        intervals {\n          left\n          width\n          text\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    resultPrint {\n      description\n      kod\n      kod_povelu\n      povel\n      rows {\n        day\n        intervals\n        __typename\n      }\n      __typename\n    }\n    queryDescription\n    __typename\n  }\n}\n"
  }
]


I haven't found a grapgQL schema to get a rid of parsing the intervals

The problem solved in version 0.4.8