Deprecated - Custom Component Krisinformation (Sweden)

This is the wrong path if you have it installed from Hacs. I need to know more of what’s not working. Can you check developer console, with F12.

Thanks for the very quick reply!

Yes, I also figured out the path is wrong and I have tried to change it in the card, but no change. I have uninstalled the card in HACS and done a manual installation according to the instruction with the same result.

Card installed from HACS again and here are some messages from the developer console.

Kaka "io" kommer snart att behandlas som cross-site kaka mot "http://192.168.0.105:8123/hacsfiles/krisinfo-card/krisinfo-card.js" eftersom schemat inte matchar.  (I get this warning for all elements in the web page)

This error is for the card:

card undefined Error: No card type configured.
    d chunk.2c9a655d19cc27fc04b0.js:2083
    c chunk.2c9a655d19cc27fc04b0.js:2083
    a chunk.2c9a655d19cc27fc04b0.js:2083
    value chunk.cf0cfe4f7e4d6da03074.js:2858
    _cards chunk.cf0cfe4f7e4d6da03074.js:2858
    value chunk.cf0cfe4f7e4d6da03074.js:2858
    value chunk.cf0cfe4f7e4d6da03074.js:2858
    performUpdate app.c5d13434.js:10291
    _enqueueUpdate app.c5d13434.js:10291
chunk.2c9a655d19cc27fc04b0.js:2083
    c chunk.2c9a655d19cc27fc04b0.js:2083
    a chunk.2c9a655d19cc27fc04b0.js:2083
    value chunk.cf0cfe4f7e4d6da03074.js:2858
    _cards chunk.cf0cfe4f7e4d6da03074.js:2858
    value chunk.cf0cfe4f7e4d6da03074.js:2858
    value chunk.cf0cfe4f7e4d6da03074.js:2858
    performUpdate app.c5d13434.js:10291
    _enqueueUpdate app.c5d13434.js:10291

https://ludeeus.dev/outlet/my-custom-cards-dont-work

1 Like

If I just write the following it works better, but don’t know if it is the expected result from the krisinfo card.

type: 'custom:krisinfo-card'
entity: sensor.krisinformation

exempel

This looks as it should, if there are no messages for the sensor right now.

Tack! Then everything was easier than it looked. I have tried to extend the radius and then received some messages.

1 Like

I’ve installed the component via HACS, but I can’t use the custom card, any ideas?

type: 'custom:krisinfo-card'
entity: sensor.krisinformation

Error:

Custom element doesn't exist: krisinfo-card.

HASS 2021.2.2 and Krisinfo latest from the store.

You need to install the card separately, have you done that?

No, I falsely thought that was in the HACS package, but I missed that it needed to be installed separately. Sorry. :slight_smile:

1 Like

Another question; how often does this sensor update? There is currently a VMA (when looking at http://api.krisinformation.se/v2/feed?format=json), but it doesn’t show up in the sensor. At least not for me.

Is it because the current post from Krisinformation is of the type “News”? Does it require to be “Alert”?

Edit: I’m guessing it has to do with the region setting I have. I thought “country: Sverige” would mean everything, but it seems it does not.
Edit2: Yep, it did. I removed the “country” part from config, and that got me everything. As per documentation.

TL;DR: RTFM

It should update every 5 minutes. Are you sure it’s within the range you set for your sensor?

Edit for your edit: Ah, yes the “country: Sverige” is for country-alerts only (the ones that are for the whole country). For now it should be a covid-related one there.

You are not the first person to make this mistake, so I should think the problem is really that it’s not intuitive :slight_smile: I made this feature request issue for my self to change this behaviour in the future, as I get the time. https://github.com/isabellaalstrom/sensor.krisinformation/issues/27

1 Like

Hi @teachingbirds! Fantastic work!

I did some modernization to support GUI and possibly to include the integration into HACS.

1 Like

Hello,
I ran into some errors trying to install this as described on the github page. When i placed all files in custom_components / krisinformation i got an error trying to install the integration thrue the GUI that the config_flow could not be found/loaded. So i renamed the folder to krisinfo instead and now i got everything up an running. However, when i configure the krisinfo integration (add my longitude etc) nothing seems to be saved. Any ideas ? I do not have any errors in my log. I am running core/supervisor 2021.6.6 :thinking:

I don’t know if I misunderstood something, but shouldn’t I be able to add and configure the integration in the integrations page under configuration? I can’t find Krisinformation when i click on [+ add integration].

I used HACS to install the integration and then rebooted HA.

[UPDATE]: Never mind, got it to work, but still struggling with the configurations.

Most cities, counties and coordinates seem to bounce back to Stockholm. How are you supposed to put in the coordinates and counties? Is it for ex. Uppsala or Uppsala län for the county? how many decimals are allowed on the coordinates? Nothing I put in seems to stick after saving. All fields keep staying empty.

Same problem here :pensive:

I opened up a new issue: Manual setting in new GUI not working · Issue #30 · isabellaalstrom/sensor.krisinformation · GitHub

2 Likes

Är den här integrationen fortfarande work in progress eller finns det andra sätt att komma åt Krisinformations feed alternativt SMHI vädervarningar?

This integration doesn’t work any longer unfortunately. I’ve updated the first post to reflect that. I’m working on a V3, but I haven’t had much time for it yet. If anyone wants to contribute or test this is the repo: https://github.com/isabellaalstrom/Krisinformation_V3

For SMHI I don’t know if this still works, but try it out: https://github.com/Lallassu/smhialert

1 Like