Skip to content

Commit

Permalink
More sensors, better device class handling, less sensors enabled by d…
Browse files Browse the repository at this point in the history
…efault (#12)

### Added

- New sensors pulled from the native HA Ambient Weather integration:
  - AQI PM2.5
  - AQI PM2.5 24h avg
  - AQI PM2.5 indoor
  - AQI PM2.5 indoor 24h avg
  - Lightning Strikes Per Day
  - Lightning Strikes Per Hour
- New binary sensors pulled from the native HA Ambient Weather integration:
  - Interior Battery
  - Leak Detector 1-4
  - Leak Detector Battery 1-4
  - Lightning Detector Battery
  - Soil Monitor Battery 1-10
- Default icon for UV Index sensor

### Changed

- Remove underscore from default sensor names
- Device class and native unit management (thanks @mkmer!); unit conversions will now work
- Clarify actual sensor states as "Unavailable" instead of "Unknown" in README
- Less common sensors are disabled by default
- Update manifest fields

### Removed

- Default icons where no longer needed:
  - 24 Hr Rain
  - Daily Rain
  - Event Rain
  - Hourly Rain Rate
  - Lifetime Rain
  - Max Gust
  - Monthly Rain
  - Weekly Rain
  - Wind Avg 10m
  - Wind Avg 2m
  - Wind Gust
  - Wind Speed
  - Yearly Rain

Co-authored-by: mkmer <[email protected]>
  • Loading branch information
tlskinneriv and mkmer authored Jan 6, 2023
1 parent 8fa22d0 commit 58d2b95
Show file tree
Hide file tree
Showing 5 changed files with 480 additions and 66 deletions.
49 changes: 48 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,50 @@ 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].

## [0.3.0] - 2023-01-06

### Added

- New sensors pulled from the native HA Ambient Weather integration:
- AQI PM2.5
- AQI PM2.5 24h avg
- AQI PM2.5 indoor
- AQI PM2.5 indoor 24h avg
- Lightning Strikes Per Day
- Lightning Strikes Per Hour
- New binary sensors pulled from the native HA Ambient Weather integration:
- Interior Battery
- Leak Detector 1-4
- Leak Detector Battery 1-4
- Lightning Detector Battery
- Soil Monitor Battery 1-10
- Default icon for UV Index sensor

### Changed

- Remove underscore from default sensor names
- Device class and native unit management (thanks @mkmer!); unit conversions will now work
- Clarify actual sensor states as "Unavailable" instead of "Unknown" in README
- Less common sensors are disabled by default
- Update manifest fields

### Removed

- Default icons where no longer needed:
- 24 Hr Rain
- Daily Rain
- Event Rain
- Hourly Rain Rate
- Lifetime Rain
- Max Gust
- Monthly Rain
- Weekly Rain
- Wind Avg 10m
- Wind Avg 2m
- Wind Gust
- Wind Speed
- Yearly Rain

## [0.2.2] - 2022-08-15

### Added
Expand Down Expand Up @@ -58,5 +102,8 @@ and this project adheres to [Semantic Versioning].

<!-- Versions -->

[unreleased]: https://github.com/tlskinneriv/awnet_local/compare/v0.2.0...HEAD
[unreleased]: https://github.com/tlskinneriv/awnet_local/compare/v0..0...HEAD
[0.3.0]: https://github.com/tlskinneriv/awnet_local/compare/v0.2.2...v0.3.0
[0.2.2]: https://github.com/tlskinneriv/awnet_local/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/tlskinneriv/awnet_local/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/tlskinneriv/awnet_local/releases/tag/v0.2.0
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ Place the `custom_components` folder in your configuration directory (or add its
## Configuration

Configuration is performed via the Home Assistant user interface. You will need the following information:

- Name: a friendly name for the device to display in Home Assistant
- MAC: the MAC address for the device

Once configured, setup the accompanying add-on [AWNET](https://github.com/tlskinneriv/hassio-addons/tree/master/awnet) (see the [docs](https://github.com/tlskinneriv/hassio-addons/blob/master/awnet/DOCS.md) for direct instructions).

## Known Issues

Currently, there is not a method implemented to determine what sensors a weather station supports. Therefore, all possible supported sensors are populated for the integration (this list was originally pulled from the [cloud-based integration](https://github.com/home-assistant/core/tree/dev/homeassistant/components/ambient_station)). The sensors will populate as "Unknown" until a value is received from the add-on. Unsupported sensors will remain in the "Unknown" state. Recommendation is to disable the unsupported sensors until such a method is implemented.
Currently, there is not a method implemented to determine what sensors a weather station supports.
Therefore, all possible supported sensors are populated for the integration (this list was
originally pulled from the [cloud-based
integration](https://github.com/home-assistant/core/tree/dev/homeassistant/components/ambient_station)).
The sensors will populate as "Unavailable" until a value is received from the add-on. Sensors not
populated by the device will remain in the "Unavailable" state. Recommendation is to disable the
unsupported sensors until such a method is implemented. Many uncommon sensors are disabled by default.
2 changes: 1 addition & 1 deletion custom_components/awnet_local/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def __init__(
name=station_name,
)

self._attr_name = f"{station_name}_{description.name}"
self._attr_name = f"{station_name} {description.name}"
self._attr_unique_id = f"{mac_address}_{description.key}"
self._mac_address = mac_address
self._attr_available = False
Expand Down
Loading

0 comments on commit 58d2b95

Please sign in to comment.