You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use ha-multiscrape for a few HTML tables and JSON files. I'm not too sure what value_template I should use to generate data that works for list-card.
For example:
The original JSON would look like this:
[
{
"product_id": "K04W",
"issue_datetime": "2022-05-16 05:00:24.337",
"message": "Space Weather Message Code: WARK04\r\nSerial Number: 4102\r\nIssue Time: 2022 May 16 0500 UTC\r\n\r\nWARNING: Geomagnetic K-index of 4 expected\r\nValid From: 2022 May 16 0500 UTC\r\nValid To: 2022 May 16 0900 UTC\r\nWarning Condition: Onset\r\n\r\nNOAA Space Weather Scale descriptions can be found at\r\nwww.swpc.noaa.gov\/noaa-scales-explanation\r\n\r\nPotential Impacts: Area of impact primarily poleward of 65 degrees Geomagnetic Latitude.\r\nInduced Currents - Weak power grid fluctuations can occur.\r\nAurora - Aurora may be visible at high latitudes such as Canada and Alaska."
},
{
"product_id": "K04A",
"issue_datetime": "2022-05-15 02:53:30.973",
"message": "Space Weather Message Code: ALTK04\r\nSerial Number: 2295\r\nIssue Time: 2022 May 15 0253 UTC\r\n\r\nALERT: Geomagnetic K-index of 4\r\nThreshold Reached: 2022 May 15 0247 UTC\r\nSynoptic Period: 0000-0300 UTC\r\n \r\nActive Warning: Yes\r\n\r\nNOAA Space Weather Scale descriptions can be found at\r\nwww.swpc.noaa.gov\/noaa-scales-explanation\r\n\r\nPotential Impacts: Area of impact primarily poleward of 65 degrees Geomagnetic Latitude.\r\nInduced Currents - Weak power grid fluctuations can occur.\r\nAurora - Aurora may be visible at high latitudes such as Canada and Alaska."
},
{
"product_id": "K04W",
"issue_datetime": "2022-05-15 02:30:15.460",
"message": "Space Weather Message Code: WARK04\r\nSerial Number: 4101\r\nIssue Time: 2022 May 15 0230 UTC\r\n\r\nWARNING: Geomagnetic K-index of 4 expected\r\nValid From: 2022 May 15 0229 UTC\r\nValid To: 2022 May 15 1500 UTC\r\nWarning Condition: Onset\r\n\r\nNOAA Space Weather Scale descriptions can be found at\r\nwww.swpc.noaa.gov\/noaa-scales-explanation\r\n\r\nPotential Impacts: Area of impact primarily poleward of 65 degrees Geomagnetic Latitude.\r\nInduced Currents - Weak power grid fluctuations can occur.\r\nAurora - Aurora may be visible at high latitudes such as Canada and Alaska."
}
]
It would generate something that looks like a feed, but it wouldn't work:
friendly_name: NOAA Space Weather - Alerts
entries: - product_id: K04W
issue_datetime: 2022-05-16 05:00:24.337
message: Space Weather Message Code: WARK04
Serial Number: 4102
Issue Time: 2022 May 16 0500 UTC
WARNING: Geomagnetic K-index of 4 expected
Valid From: 2022 May 16 0500 UTC
Valid To: 2022 May 16 0900 UTC
Warning Condition: Onset
NOAA Space Weather Scale descriptions can be found at
www.swpc.noaa.gov/noaa-scales-explanation
Potential Impacts: Area of impact primarily poleward of 65 degrees Geomagnetic Latitude.
Induced Currents - Weak power grid fluctuations can occur.
Aurora - Aurora may be visible at high latitudes such as Canada and Alaska.
- product_id: K04A
issue_datetime: 2022-05-15 02:53:30.973
message: Space Weather Message Code: ALTK04
Serial Number: 2295
Issue Time: 2022 May 15 0253 UTC
ALERT: Geomagnetic K-index of 4
Threshold Reached: 2022 May 15 0247 UTC
Synoptic Period: 0000-0300 UTC
Active Warning: Yes
NOAA Space Weather Scale descriptions can be found at
www.swpc.noaa.gov/noaa-scales-explanation
Potential Impacts: Area of impact primarily poleward of 65 degrees Geomagnetic Latitude.
Induced Currents - Weak power grid fluctuations can occur.
Aurora - Aurora may be visible at high latitudes such as Canada and Alaska.
- product_id: K04W
issue_datetime: 2022-05-15 02:30:15.460
message: Space Weather Message Code: WARK04
Serial Number: 4101
Issue Time: 2022 May 15 0230 UTC
WARNING: Geomagnetic K-index of 4 expected
Valid From: 2022 May 15 0229 UTC
Valid To: 2022 May 15 1500 UTC
Warning Condition: Onset
NOAA Space Weather Scale descriptions can be found at
www.swpc.noaa.gov/noaa-scales-explanation
Potential Impacts: Area of impact primarily poleward of 65 degrees Geomagnetic Latitude.
Induced Currents - Weak power grid fluctuations can occur.
Aurora - Aurora may be visible at high latitudes such as Canada and Alaska.
The text was updated successfully, but these errors were encountered:
Looking at the code base I'm pretty sure your original json should work as an input. The problem with value templates is they only allow 255 characters though. Perhaps look at making a sensor that contains the data hardcoded in configuration.yaml? I would be interested in helping if you still need this.
I use ha-multiscrape for a few HTML tables and JSON files. I'm not too sure what value_template I should use to generate data that works for list-card.
For example:
The original JSON would look like this:
So I configured multiscrape to do this:
It would generate something that looks like a feed, but it wouldn't work:
The text was updated successfully, but these errors were encountered: