Skip to content

Commit

Permalink
Merge pull request #40 from michael-slx/develop
Browse files Browse the repository at this point in the history
Release 1.1.4
  • Loading branch information
michael-slx authored Mar 1, 2024
2 parents 8c0d6b8 + babfb52 commit 530b184
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
4 changes: 3 additions & 1 deletion bin/user/weatherlink_live/config_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from typing import Any, Dict, Tuple, List, Optional
from typing import Any, Dict, Tuple, List, Optional, Union

import weecfg
import weewx.drivers
Expand Down Expand Up @@ -124,6 +124,8 @@ def _print_schema_info():


class WeatherlinkLiveConfEditor(weewx.drivers.AbstractConfEditor):
existing_options: Dict[str, Optional[Union[str, List[str]]]]

def __init__(self):
self.existing_options = dict()

Expand Down
8 changes: 4 additions & 4 deletions bin/user/weatherlink_live/mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def map_source_transmitter(self) -> str:
raise NotImplementedError()

@property
def map_table(self) -> Dict[str, Union[str, list[str]]]:
def map_table(self) -> Dict[str, Union[str, List[str]]]:
raise NotImplementedError()


Expand Down Expand Up @@ -476,7 +476,7 @@ def map_source_transmitter(self) -> str:
return labels.LABEL_SOURCE_TX_ID % self.tx_id

@property
def map_table(self) -> Dict[str, list[str]]:
def map_table(self) -> Dict[str, List[str]]:
return {
labels.LABEL_THW_INDEX: [self.targets['thw'], self.targets['app_temp']] if self.is_app_temp else [
self.targets['thw']],
Expand Down Expand Up @@ -517,7 +517,7 @@ def map_source_transmitter(self) -> str:
return labels.LABEL_SOURCE_TX_ID % self.tx_id

@property
def map_table(self) -> Dict[str, list[str]]:
def map_table(self) -> Dict[str, List[str]]:
return {
labels.LABEL_THSW_INDEX: [self.targets['thsw'], self.targets['app_temp']] if self.is_app_temp else [
self.targets['thsw']],
Expand Down Expand Up @@ -723,7 +723,7 @@ def map_source_transmitter(self) -> str:
return labels.LABEL_SOURCE_TX_ID % self.tx_id

@property
def map_table(self) -> Dict[str, list[str]]:
def map_table(self) -> Dict[str, List[str]]:
return {
labels.LABEL_BATTERY_STATUS: [self.targets['battery'], *self.further_targets],
}
2 changes: 1 addition & 1 deletion bin/user/weatherlink_live/static/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@


DRIVER_NAME = "WeatherLinkLive"
DRIVER_VERSION = "1.1.3"
DRIVER_VERSION = "1.1.4"
12 changes: 12 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,15 @@ Driver is now compatible with **Python 3.7 or later**.

The snippet contains sensible defaults for a WeatherLink Live with a standard Vantage Pro II Plus.

## Version 1.1.4

- **Remove `[Station]` section from installer example config** ([PR #39](https://github.com/michael-slx/weewx-weatherlink-live/pull/39))

Specifying this section in the example config caused it to be removed when the extension was uninstalled, breaking the whole configuration file.

Thanks to user [tkeffer](https://github.com/tkeffer) for submitting the pull request.

- **Fix type-hinting issue and compatibility problems**

WeeWX supports Python 3.7 but some type-hinting used by this driver required at least Python 3.9. This was fixed so that the driver now works with Python 3.7.

2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If you haven't done so already, install the following packages:
1. Install the extension by running the following command, possibly using `sudo`.

```sh
> weectl extension install https://github.com/michael-slx/weewx-weatherlink-live/releases/download/v1.1.3/weewx-weatherlink-live-v1.1.3.tar.xz
> weectl extension install https://github.com/michael-slx/weewx-weatherlink-live/releases/download/v1.1.4/weewx-weatherlink-live-v1.1.4.tar.xz
```

Answer `y` (Yes), when asked if you want to install the extension.
Expand Down
11 changes: 1 addition & 10 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ def loader():


WLL_CONFIG = """
[Station]
# This section is for information about the station.
# Set to type of station hardware. There must be a corresponding stanza
# in this file, which includes a value for the 'driver' option.
station_type = WeatherLinkLive
##############################################################################
[WeatherLinkLive]
# This section configures the WeatherLink Live driver.
Expand Down Expand Up @@ -77,7 +68,7 @@ class WeatherLinkLiveInstaller(ExtensionInstaller):
def __init__(self):
super(WeatherLinkLiveInstaller, self).__init__(
name='weatherlink-live',
version="1.1.3",
version="1.1.4",
description='WeeWX driver for Davis WeatherLink Live.',
author="Michael Schantl",
author_email="floss@schantl-lx.at",
Expand Down

0 comments on commit 530b184

Please sign in to comment.