From e44a35adf73a788e27f90f2e3baad9b348a673aa Mon Sep 17 00:00:00 2001 From: tlskinneriv Date: Fri, 14 Jul 2023 11:28:51 -0500 Subject: [PATCH] add missing sensors (#34) * add missing sensors * update to 1.1.3 for release --- CHANGELOG.md | 9 +++- custom_components/awnet_local/const_sensor.py | 52 +++++++++++++++++++ custom_components/awnet_local/manifest.json | 26 +++++----- 3 files changed, 72 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f0a0dd..e0bfc31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning]. -## [Unreleased] - 2023-07-13 +## [1.1.3] - 2023-07-13 ### Fixed - Lightning Strike Distance fixed to be `distance` device class - Device class added for evapotranspiration and GDD sensors - Housekeeping: updated devcontainer configuation for Python 3.11 +- The following sensors were previously missing for the AQIN sensor and have been added: + - AQI PM2.5 (AQIN) + - AQI PM2.5 24h Avg (AQIN) + - CO2 Indoor (AQIN) + - CO2 Indoor 24h Avg (AQIN) + - PM Indoor Humidity (AQIN) + - PM Indoor Temp (AQIN) ## [1.1.2] - 2023-06-16 diff --git a/custom_components/awnet_local/const_sensor.py b/custom_components/awnet_local/const_sensor.py index 73bcdc6..93421b3 100644 --- a/custom_components/awnet_local/const_sensor.py +++ b/custom_components/awnet_local/const_sensor.py @@ -33,6 +33,8 @@ TYPE_AQI_PM10_IN_AQIN = "aqi_pm10_in_aqin" TYPE_AQI_PM25 = "aqi_pm25" TYPE_AQI_PM25_24H = "aqi_pm25_24h" +TYPE_AQI_PM25_24H_AQIN = "aqi_pm25_24h_aqin" +TYPE_AQI_PM25_AQIN = "aqi_pm25_aqin" TYPE_AQI_PM25_IN = "aqi_pm25_in" TYPE_AQI_PM25_IN_24H = "aqi_pm25_in_24h" TYPE_AQI_PM25_IN_24H_AQIN = "aqi_pm25_in_24h_aqin" @@ -42,6 +44,8 @@ TYPE_CO2 = "co2" TYPE_CO2_IN = "co2_in" TYPE_CO2_IN_24H = "co2_in_24h" +TYPE_CO2_IN_24H_AQIN = "co2_in_24h_aqin" +TYPE_CO2_IN_AQIN = "co2_in_aqin" TYPE_DAILYRAININ = "dailyrainin" TYPE_DATEUTC = "dateutc" TYPE_DEWPOINT = "dewPoint" @@ -81,7 +85,9 @@ TYPE_MAXDAILYGUST = "maxdailygust" TYPE_MONTHLYRAININ = "monthlyrainin" TYPE_PM_IN_HUMIDITY = "pm_in_humidity" +TYPE_PM_IN_HUMIDITY_AQIN = "pm_in_humidity_aqin" TYPE_PM_IN_TEMP = "pm_in_temp" +TYPE_PM_IN_TEMP_AQIN = "pm_in_temp_aqin" TYPE_PM10_IN = "pm10_in" TYPE_PM10_IN_24H = "pm10_in_24h" TYPE_PM10_IN_24H_AQIN = "pm10_in_24h_aqin" @@ -147,7 +153,9 @@ TYPE_24HOURRAININ, TYPE_AQI_PM10_IN_24H_AQIN, TYPE_AQI_PM10_IN_AQIN, + TYPE_AQI_PM25_24H_AQIN, TYPE_AQI_PM25_24H, + TYPE_AQI_PM25_AQIN, TYPE_AQI_PM25_IN_24H_AQIN, TYPE_AQI_PM25_IN_24H, TYPE_AQI_PM25_IN_AQIN, @@ -155,7 +163,9 @@ TYPE_AQI_PM25, TYPE_BAROMABSIN, TYPE_BAROMRELIN, + TYPE_CO2_IN_24H_AQIN, TYPE_CO2_IN_24H, + TYPE_CO2_IN_AQIN, TYPE_CO2_IN, TYPE_CO2, TYPE_DAILYRAININ, @@ -196,7 +206,9 @@ TYPE_LIGHTNING_TIME, TYPE_MAXDAILYGUST, TYPE_MONTHLYRAININ, + TYPE_PM_IN_HUMIDITY_AQIN, TYPE_PM_IN_HUMIDITY, + TYPE_PM_IN_TEMP_AQIN, TYPE_PM_IN_TEMP, TYPE_PM10_IN_24H_AQIN, TYPE_PM10_IN_24H, @@ -298,12 +310,24 @@ device_class=SensorDeviceClass.AQI, state_class=SensorStateClass.MEASUREMENT, ), + SensorEntityDescription( + key=TYPE_AQI_PM25_AQIN, + name="AQI PM2.5 (AQIN)", + device_class=SensorDeviceClass.AQI, + state_class=SensorStateClass.MEASUREMENT, + ), SensorEntityDescription( key=TYPE_AQI_PM25, name="AQI PM2.5", device_class=SensorDeviceClass.AQI, state_class=SensorStateClass.MEASUREMENT, ), + SensorEntityDescription( + key=TYPE_AQI_PM25_24H_AQIN, + name="AQI PM2.5 24h Avg (AQIN)", + device_class=SensorDeviceClass.AQI, + state_class=SensorStateClass.MEASUREMENT, + ), SensorEntityDescription( key=TYPE_AQI_PM25_24H, name="AQI PM2.5 24h Avg", @@ -355,6 +379,13 @@ device_class=SensorDeviceClass.CO2, state_class=SensorStateClass.MEASUREMENT, ), + SensorEntityDescription( + key=TYPE_CO2_IN_AQIN, + name="CO2 Indoor (AQIN)", + native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, + device_class=SensorDeviceClass.CO2, + state_class=SensorStateClass.MEASUREMENT, + ), SensorEntityDescription( key=TYPE_CO2_IN, name="CO2 Indoor", @@ -362,6 +393,13 @@ device_class=SensorDeviceClass.CO2, state_class=SensorStateClass.MEASUREMENT, ), + SensorEntityDescription( + key=TYPE_CO2_IN_24H_AQIN, + name="CO2 Indoor 24h Avg (AQIN)", + native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, + device_class=SensorDeviceClass.CO2, + state_class=SensorStateClass.MEASUREMENT, + ), SensorEntityDescription( key=TYPE_CO2_IN_24H, name="CO2 Indoor 24h Avg", @@ -644,6 +682,13 @@ device_class=SensorDeviceClass.PRECIPITATION, state_class=SensorStateClass.MEASUREMENT, ), + SensorEntityDescription( + key=TYPE_PM_IN_HUMIDITY_AQIN, + name="PM Indoor Humidity (AQIN)", + native_unit_of_measurement=PERCENTAGE, + device_class=SensorDeviceClass.HUMIDITY, + state_class=SensorStateClass.MEASUREMENT, + ), SensorEntityDescription( key=TYPE_PM_IN_HUMIDITY, name="PM Indoor Humidity", @@ -651,6 +696,13 @@ device_class=SensorDeviceClass.HUMIDITY, state_class=SensorStateClass.MEASUREMENT, ), + SensorEntityDescription( + key=TYPE_PM_IN_TEMP_AQIN, + name="PM Indoor Temp (AQIN)", + native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT, + device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, + ), SensorEntityDescription( key=TYPE_PM_IN_TEMP, name="PM Indoor Temp", diff --git a/custom_components/awnet_local/manifest.json b/custom_components/awnet_local/manifest.json index b27056f..6848b22 100644 --- a/custom_components/awnet_local/manifest.json +++ b/custom_components/awnet_local/manifest.json @@ -1,15 +1,13 @@ { - "domain": "awnet_local", - "name": "Ambient Weather Station - Local", - "codeowners": [ - "@tlskinneriv" - ], - "config_flow": true, - "dependencies": [], - "documentation": "https://github.com/tlskinneriv/awnet_local", - "integration_type": "device", - "iot_class": "local_push", - "issue_tracker": "https://github.com/tlskinneriv/awnet_local/issues", - "requirements": [], - "version": "1.1.2" -} \ No newline at end of file + "domain": "awnet_local", + "name": "Ambient Weather Station - Local", + "codeowners": ["@tlskinneriv"], + "config_flow": true, + "dependencies": [], + "documentation": "https://github.com/tlskinneriv/awnet_local", + "integration_type": "device", + "iot_class": "local_push", + "issue_tracker": "https://github.com/tlskinneriv/awnet_local/issues", + "requirements": [], + "version": "1.1.3" +}