From 3eb9265aecc57773c52c228d8b567bf60d4b7540 Mon Sep 17 00:00:00 2001 From: pawkakol1 Date: Thu, 2 Mar 2023 21:15:16 +0100 Subject: [PATCH 1/5] Checking if station supports forecast added --- .../worlds_air_quality_index/sensor.py | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/custom_components/worlds_air_quality_index/sensor.py b/custom_components/worlds_air_quality_index/sensor.py index 4ba8655..c411710 100644 --- a/custom_components/worlds_air_quality_index/sensor.py +++ b/custom_components/worlds_air_quality_index/sensor.py @@ -103,6 +103,9 @@ async def async_setup_entry( scannedData = requester.GetData() _LOGGER.debug("Got station data from WAQI server:") _LOGGER.debug(scannedData) + + if not "forecast" in scannedData['data']: + _LOGGER.warning(f"Station {name} doesn't support forecast") scannedDataSensors = scannedData["data"]["iaqi"] entities = [] @@ -211,27 +214,28 @@ def update(self) -> None: "StationName": self._requester.GetStationName(), "LastUpdate": self._requester.GetUpdateLastTime() } - if self._resType in self._data['data']['forecast']['daily']: - scannedDataForecast = self._data['data']['forecast']['daily'][self._resType] - day = date.today() - dayName = "Today" - if scannedDataForecast is not None: - for res in scannedDataForecast: - readDate = date.fromisoformat(res["day"]) - if readDate == day: - self._attr_extra_state_attributes['Forecast' + dayName + 'Avg'] = res['avg'] - self._attr_extra_state_attributes['Forecast' + dayName + 'Min'] = res['min'] - self._attr_extra_state_attributes['Forecast' + dayName + 'Max'] = res['max'] - _LOGGER.debug(f"Forecast{dayName} Avg/Min/Max extra state attributes added.") - - day = day + timedelta(days=1) - if dayName == "Today": - dayName = "Tomorrow" - elif dayName == "Tomorrow": - dayName = "2Days" - elif dayName == "2Days": - dayName = "3Days" - elif dayName == "3Days": - dayName = "4Days" - elif dayName == "4Days": - dayName = "5Days" \ No newline at end of file + if "forecast" in self._data['data']: + if self._resType in self._data['data']['forecast']['daily']: + scannedDataForecast = self._data['data']['forecast']['daily'][self._resType] + day = date.today() + dayName = "Today" + if scannedDataForecast is not None: + for res in scannedDataForecast: + readDate = date.fromisoformat(res["day"]) + if readDate == day: + self._attr_extra_state_attributes['Forecast' + dayName + 'Avg'] = res['avg'] + self._attr_extra_state_attributes['Forecast' + dayName + 'Min'] = res['min'] + self._attr_extra_state_attributes['Forecast' + dayName + 'Max'] = res['max'] + _LOGGER.debug(f"Forecast{dayName} Avg/Min/Max extra state attributes added.") + + day = day + timedelta(days=1) + if dayName == "Today": + dayName = "Tomorrow" + elif dayName == "Tomorrow": + dayName = "2Days" + elif dayName == "2Days": + dayName = "3Days" + elif dayName == "3Days": + dayName = "4Days" + elif dayName == "4Days": + dayName = "5Days" \ No newline at end of file From a3d739bda6c1c38d720255f122062ee923095dc6 Mon Sep 17 00:00:00 2001 From: pawkakol1 Date: Thu, 2 Mar 2023 21:58:56 +0100 Subject: [PATCH 2/5] Forecast description added to the README file --- README.md | 23 ++++++++++++++++++----- readme_files/forecast.png | Bin 0 -> 14336 bytes 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 readme_files/forecast.png diff --git a/README.md b/README.md index 735ee1c..2a76ed4 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,20 @@ Integration supports below sensors of WAQI station: Diffrent stations support diffrent data, "World's Air Quality Index" integration will recognise all parameters (availible in station) according to list of integration's supported sensors. -WAQI supports diffrents API from +If station's API supports forecast for pollution sensors (these on above list): + +- Carbon monoxide (CO) +- Nitrogen dioxide (NO2) +- Ozone (O3) +- Particulate matter (PM10) +- Particulate matter (PM2,5) +- Sulphur dioxide (SO2) + +Pollution sensors will update forecast, and it will be able to read as attributes of the sensor: + + + +If the station supports forecast of soem pollution sensor, but it doesn't support actual value of this sensor, then the forecast will be omitted. There are 2 supported integration methods: @@ -46,10 +59,10 @@ To add integration use "Add Integration" button in section Settings->Devices&Ser In popup window choose method of station adding: - using geographic localization (NOTICE: it works with WAQI internal stations only), -- using station ID (NOTICE: it works with all API types available in WAQI: - - WAQI internal stations, - - stations from CanAir.IO, - - stations from Citizen Science project luftdaten.info. +- using station ID (NOTICE: it works with all API types available in WAQI: + - WAQI internal stations, + - stations from CanAir.IO, + - stations from Citizen Science project luftdaten.info. In case of geographic localization, there will be shown next window, where you need to put: diff --git a/readme_files/forecast.png b/readme_files/forecast.png new file mode 100644 index 0000000000000000000000000000000000000000..66b178ffbe257cdf1ead458da7e2285e5d0b9718 GIT binary patch literal 14336 zcmbumcUV(j+ckK=f(TeZLApo~r5EW<0U;DYy3%`Zp%bb|ktPwOHwBR%nn37C?@EpI z5_**qKp1DVzy%VXYld-aklR4}T@pJzCiGu05#a77Nch+7;f4y63g zUXl?C zKyw-SUFVDIbVB?J^15z>OX1d3*?h0Q{hoP#W>roAPzJIs7knvfLH5+K?LDhuWMzho zAQo>19AAmmwX_^4pBaDlPyX@W2$L)^P% z@ERbjra7+DF7@sW2Mj9if0p#&^8dPuQkoD@L9R(ZIA#Kx!=FI`py(Pg5O|k~04RL` z0RU}RO7e63A2F+dUH_Guv-54S_n3NDo!Og!@O6>UwqaHFf`apf;eeZtMCz6PZfoag zRsY6C{Q9!SpL3<)%Qb{RO%FE&zZHkp3h_uom-yYC!lbf6l!Gq=bd^)m3r9`f{jX1! zN@kqX(UK>A&a;N6J6eM`aDHO$u1-6Js`v>QzEfm9| z{B?m>vgZe?=LgjRr`6x1*Ou;*H~H*z4#WiD#I(i@RyudwgM5xMB>dnT4qDN(jo5?y zg7*AWe`wxi;nTyM0Bgl>q#?okaYlY_8v`p%e@2Z&2V%|}If>Xgn0OBseN?4Rb2iSF zO8oc#q)%oVvegWz&YY(Ad~R6r33R{GVQzJ}ehj=RWy2{T8uiTuSBlgqZ)~%$(EW3+FzTcLG z1CG3J0kMYLEZ%AUgFU$?sLmOkbTLm|qvLa;z~|&F!8=PX4-yeS@A__Kb00*{;xZY< zl$<(gSIlGu2Y!h(%Xlv3$kxmQhi_M4sx_N$-o_mgeasp?#@jBxi z@0p2T-ZDCqZCS{5H=DWybY>>s%J=!&A5JH|uoi73JYbh7S?9V^b&g#VvwQD~q_)pu z(x(&Yb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Osfkim}_6Si_9+U7bL8PL`xvK?wq%*Gl?qMHb9l&7G&)+I|Rroz4HL zNSu4-V|dVZ!T?9!{0W_b%YD{^Va&-b-xna8CyD$woBwyc0IP6ZXj>es>fzD&&JBR| z9ouQaF_BPt8`JK=+VD=}DHnv4?>D8r4>!kGp#%U2sn&0;@tcmXAkxxH-I&gp^RpExqG|$wL@^$& z^;`ZX^G9%Y0#1fA@xQ~QoKq+O4j!#Vt$dv;QYeSS8^q7ao{rq)&j12LzFeI7qF~Sm z`^wMTBWXgNeF*`|D7MXldR4yA-xguPd$^-nDWAh4^oHMlzYut=j9%;$Fqic2!)M^3 zvQ5~vI01<7dX46$xZlY^cN{C5F93ADXPYaCDm0bU5v-1xbCKmR ctUo@tU%FpH+meX_PwfE;&sAiR(#Apm2PeB4ssI20 literal 0 HcmV?d00001 From a9b8d9080a3adcbd1f88404b11bd0cbe2a8edbbd Mon Sep 17 00:00:00 2001 From: pawkakol1 Date: Fri, 3 Mar 2023 18:38:41 +0100 Subject: [PATCH 3/5] log level of no support the forecast decreased to info level --- custom_components/worlds_air_quality_index/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/worlds_air_quality_index/sensor.py b/custom_components/worlds_air_quality_index/sensor.py index c411710..f628a11 100644 --- a/custom_components/worlds_air_quality_index/sensor.py +++ b/custom_components/worlds_air_quality_index/sensor.py @@ -105,7 +105,7 @@ async def async_setup_entry( _LOGGER.debug(scannedData) if not "forecast" in scannedData['data']: - _LOGGER.warning(f"Station {name} doesn't support forecast") + _LOGGER.info(f"Station {name} doesn't support forecast") scannedDataSensors = scannedData["data"]["iaqi"] entities = [] From 66454c4eeb7e15f2069f8126f9b7bcefc0c573c3 Mon Sep 17 00:00:00 2001 From: pawkakol1 Date: Fri, 3 Mar 2023 18:51:51 +0100 Subject: [PATCH 4/5] version increase --- custom_components/worlds_air_quality_index/const.py | 2 +- custom_components/worlds_air_quality_index/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/worlds_air_quality_index/const.py b/custom_components/worlds_air_quality_index/const.py index 81294b2..08316fa 100644 --- a/custom_components/worlds_air_quality_index/const.py +++ b/custom_components/worlds_air_quality_index/const.py @@ -18,7 +18,7 @@ DOMAIN = "worlds_air_quality_index" PLATFORMS = [Platform.SENSOR] -SW_VERSION = "0.3.7" +SW_VERSION = "1.0.1" DEFAULT_NAME = 'waqi1' DISCOVERY_TYPE = "discovery_type" diff --git a/custom_components/worlds_air_quality_index/manifest.json b/custom_components/worlds_air_quality_index/manifest.json index 7598b0e..afc0d87 100644 --- a/custom_components/worlds_air_quality_index/manifest.json +++ b/custom_components/worlds_air_quality_index/manifest.json @@ -10,6 +10,6 @@ "issue_tracker": "https://github.com/pawkakol1/worlds-air-quality-index/issues", "requirements": [], "ssdp": [], - "version": "0.3.7", + "version": "1.0.1", "zeroconf": [] } From 97799b2a8b883e5758d8770f75d1bfa80ee91b4e Mon Sep 17 00:00:00 2001 From: pawkakol1 Date: Fri, 3 Mar 2023 18:55:26 +0100 Subject: [PATCH 5/5] Revert "log level of no support the forecast set to warning level" This reverts commit a9b8d9080a3adcbd1f88404b11bd0cbe2a8edbbd. --- custom_components/worlds_air_quality_index/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/worlds_air_quality_index/sensor.py b/custom_components/worlds_air_quality_index/sensor.py index f628a11..c411710 100644 --- a/custom_components/worlds_air_quality_index/sensor.py +++ b/custom_components/worlds_air_quality_index/sensor.py @@ -105,7 +105,7 @@ async def async_setup_entry( _LOGGER.debug(scannedData) if not "forecast" in scannedData['data']: - _LOGGER.info(f"Station {name} doesn't support forecast") + _LOGGER.warning(f"Station {name} doesn't support forecast") scannedDataSensors = scannedData["data"]["iaqi"] entities = []