Closed mupsje closed 3 years ago
The card might remain blank until the sensor has fetched the data. These custom sensors are not set-up with a unique id. The message of the screenshot is correct and as expected: https://www.home-assistant.io/faq/unique_id.
This however is not an error, but just a limitation of the integration you use
In Developer Tools you can see if the sensors contain data: http://homeassistant:8123/developer-tools/state. Look for the buienalarm_regen_data
and buienradar_regen_data
entity. Both should contain data based upon your configuration.
Hi,
I get data but still a blank card on front.......
There seems to be an issue with rendering the graph when sensor.buienalarm_regen_data
does not contain "rain" data
.
In this particular case your issue can be resolved by configuring sensor.buienalarm_regen_data
correctly. As the error message reads: "not in coverage". Which basically means, your longitude and/or latitude are wrong or Buienalarm is not available where you live.
The actual fix for this issue is improving the error handling for when sensor.buienalarm_regen_data
is not providing "rain" data
, as now the graph for sensor.buienradar_regen_data
is also not getting displayed.
@mupsje,
- platform: command_line command: python3 -c "import requests; import json; import random; dataRequest = requests.get('https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?lat=<50.967>&lon=<5.827>®ion=nl&unit=mm%2Fu&c='+str(random.randint(0,999999999999999)) ).text; dataRequest = dataRequest.replace('\r\n',' '); data = '{"data":'+dataRequest+'}'; print(data);" name: Buienalarm_Regen_Data
do not write your lat and lon values within "<>", so it should be like "lat=50.967&lon=5.827"
I had the same problem and above solution worked for me. I hope it helps.
That is correct and would explain why no actual rain data is fetched.
Yesssssssssss..
@ersitan Thank you very much! @aex351 maybe a good think to ad in the description.
Greets!
I installed all.
and put this inside my sensors.yaml
platform: command_line command: python3 -c "import requests; import json; import random; dataRequest = requests.get('https://cdn-secure.buienalarm.nl/api/3.4/forecast.php?lat=<50.967>&lon=<5.827>®ion=nl&unit=mm%2Fu&c='+str(random.randint(0,999999999999999)) ).text; dataRequest = dataRequest.replace('\r\n',' '); data = '{\"data\":'+dataRequest+'}'; print(data);" name: Buienalarm_Regen_Data json_attributes:
platform: command_line command: python3 -c "import requests; import json; import random; dataRequest = requests.get('https://gpsgadget.buienradar.nl/data/raintext?lat=<50.96>&lon=<5.82>&c='+str(random.randint(0,999999999999999)) ).text; dataRequest = dataRequest.replace('\r\n',' '); data = '{\"data\":\"'+dataRequest+'\"}'; print(data);" name: Buienradar_Regen_Data json_attributes:
Then I put the lines inside the cards. type: 'custom:neerslag-card' title: Neerslag entities:
Card remain Blank.
When I go to entities , I get a faild "does not have a unique ID"
please advice