* Add nws weather. * Hassfest * Address multiple comments * Add NWS icon weather code link * Add metar fallback. Use metar code from nws observation if normal api is missing data. * only get 1 observation - we dont use more than 1 * add mocked metar for tests * lint * mock metar package for all tests * add check for metar attributes * catch errors in setup * add timeout error * handle request exceptions * check and test for missing observations * refactor to new pynws * change to simpler api * Make py3.5 compatible Remove f string * bump pynws version * gen_requirements * fix wind bearing observation * Revert "Make py3.5 compatible" This reverts commit 4946d91779a6e539ea43e667b2265557a49a0bb5. * Precommit black missed a file? * black test * add exceptional weather condition * bump pynws version * update requirements_all * address comments * move observation and forecast outside try-except-else * Revert "move observation and forecast outside try-except-else" This reverts commit 53b78b32837b55b8a0b61de6192e846f6a486754. * remove else from update forecast block * remove unneeded ConfigEntryNotReady import * add scan_interval, reduce min_time_between_updates * pytest tests * lint test docstring * use async await * lat and lon inclusive in config
161 lines
5.6 KiB
JSON
161 lines
5.6 KiB
JSON
{
|
|
"@context": [
|
|
"https://raw.githubusercontent.com/geojson/geojson-ld/master/contexts/geojson-base.jsonld",
|
|
{
|
|
"wx": "https://api.weather.gov/ontology#",
|
|
"s": "https://schema.org/",
|
|
"geo": "http://www.opengis.net/ont/geosparql#",
|
|
"unit": "http://codes.wmo.int/common/unit/",
|
|
"@vocab": "https://api.weather.gov/ontology#",
|
|
"geometry": {
|
|
"@id": "s:GeoCoordinates",
|
|
"@type": "geo:wktLiteral"
|
|
},
|
|
"city": "s:addressLocality",
|
|
"state": "s:addressRegion",
|
|
"distance": {
|
|
"@id": "s:Distance",
|
|
"@type": "s:QuantitativeValue"
|
|
},
|
|
"bearing": {
|
|
"@type": "s:QuantitativeValue"
|
|
},
|
|
"value": {
|
|
"@id": "s:value"
|
|
},
|
|
"unitCode": {
|
|
"@id": "s:unitCode",
|
|
"@type": "@id"
|
|
},
|
|
"forecastOffice": {
|
|
"@type": "@id"
|
|
},
|
|
"forecastGridData": {
|
|
"@type": "@id"
|
|
},
|
|
"publicZone": {
|
|
"@type": "@id"
|
|
},
|
|
"county": {
|
|
"@type": "@id"
|
|
}
|
|
}
|
|
],
|
|
"type": "FeatureCollection",
|
|
"features": [
|
|
{
|
|
"id": "https://api.weather.gov/stations/KMIE/observations/2019-08-12T23:53:00+00:00",
|
|
"type": "Feature",
|
|
"geometry": {
|
|
"type": "Point",
|
|
"coordinates": [
|
|
-85.400000000000006,
|
|
40.25
|
|
]
|
|
},
|
|
"properties": {
|
|
"@id": "https://api.weather.gov/stations/KMIE/observations/2019-08-12T23:53:00+00:00",
|
|
"@type": "wx:ObservationStation",
|
|
"elevation": {
|
|
"value": 286,
|
|
"unitCode": "unit:m"
|
|
},
|
|
"station": "https://api.weather.gov/stations/KMIE",
|
|
"timestamp": "2019-08-12T23:53:00+00:00",
|
|
"rawMessage": "KMIE 122353Z 19005KT 10SM CLR 27/19 A2987 RMK AO2 SLP104 60000 T02670194 10272 20250 58002",
|
|
"textDescription": "Clear",
|
|
"icon": "https://api.weather.gov/icons/land/day/skc?size=medium",
|
|
"presentWeather": [],
|
|
"temperature": {
|
|
"value": 26.700000000000045,
|
|
"unitCode": "unit:degC",
|
|
"qualityControl": "qc:V"
|
|
},
|
|
"dewpoint": {
|
|
"value": 19.400000000000034,
|
|
"unitCode": "unit:degC",
|
|
"qualityControl": "qc:V"
|
|
},
|
|
"windDirection": {
|
|
"value": 190,
|
|
"unitCode": "unit:degree_(angle)",
|
|
"qualityControl": "qc:V"
|
|
},
|
|
"windSpeed": {
|
|
"value": 2.6000000000000001,
|
|
"unitCode": "unit:m_s-1",
|
|
"qualityControl": "qc:V"
|
|
},
|
|
"windGust": {
|
|
"value": null,
|
|
"unitCode": "unit:m_s-1",
|
|
"qualityControl": "qc:Z"
|
|
},
|
|
"barometricPressure": {
|
|
"value": 101150,
|
|
"unitCode": "unit:Pa",
|
|
"qualityControl": "qc:V"
|
|
},
|
|
"seaLevelPressure": {
|
|
"value": 101040,
|
|
"unitCode": "unit:Pa",
|
|
"qualityControl": "qc:V"
|
|
},
|
|
"visibility": {
|
|
"value": 16090,
|
|
"unitCode": "unit:m",
|
|
"qualityControl": "qc:C"
|
|
},
|
|
"maxTemperatureLast24Hours": {
|
|
"value": null,
|
|
"unitCode": "unit:degC",
|
|
"qualityControl": null
|
|
},
|
|
"minTemperatureLast24Hours": {
|
|
"value": null,
|
|
"unitCode": "unit:degC",
|
|
"qualityControl": null
|
|
},
|
|
"precipitationLastHour": {
|
|
"value": null,
|
|
"unitCode": "unit:m",
|
|
"qualityControl": "qc:Z"
|
|
},
|
|
"precipitationLast3Hours": {
|
|
"value": null,
|
|
"unitCode": "unit:m",
|
|
"qualityControl": "qc:Z"
|
|
},
|
|
"precipitationLast6Hours": {
|
|
"value": 0,
|
|
"unitCode": "unit:m",
|
|
"qualityControl": "qc:C"
|
|
},
|
|
"relativeHumidity": {
|
|
"value": 64.292485914891955,
|
|
"unitCode": "unit:percent",
|
|
"qualityControl": "qc:C"
|
|
},
|
|
"windChill": {
|
|
"value": null,
|
|
"unitCode": "unit:degC",
|
|
"qualityControl": "qc:V"
|
|
},
|
|
"heatIndex": {
|
|
"value": 27.981288713580284,
|
|
"unitCode": "unit:degC",
|
|
"qualityControl": "qc:V"
|
|
},
|
|
"cloudLayers": [
|
|
{
|
|
"base": {
|
|
"value": null,
|
|
"unitCode": "unit:m"
|
|
},
|
|
"amount": "CLR"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |