Skip to content

Commit

Permalink
add missing sensors (#34)
Browse files Browse the repository at this point in the history
* add missing sensors

* update to 1.1.3 for release
  • Loading branch information
tlskinneriv committed Jul 14, 2023
1 parent 73734e6 commit e44a35a
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 15 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
52 changes: 52 additions & 0 deletions custom_components/awnet_local/const_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -147,15 +153,19 @@
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,
TYPE_AQI_PM25_IN,
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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -355,13 +379,27 @@
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",
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
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",
Expand Down Expand Up @@ -644,13 +682,27 @@
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",
native_unit_of_measurement=PERCENTAGE,
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",
Expand Down
26 changes: 12 additions & 14 deletions custom_components/awnet_local/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
}
"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"
}

0 comments on commit e44a35a

Please sign in to comment.