Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix device class for lightning strike #33

Merged
merged 5 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ RUN ./setup.sh

# WORKDIR /workspaces

# # Install Python dependencies from requirements
# COPY requirements.txt ./
# Install Python dependencies from requirements
COPY .devcontainer/requirements.txt ./
# COPY homeassistant/package_constraints.txt homeassistant/package_constraints.txt
# RUN pip3 install -r requirements.txt
RUN pip3 install -r requirements.txt
# COPY requirements_test.txt requirements_test_pre_commit.txt ./
# RUN pip3 install -r requirements_test.txt
# RUN rm -rf requirements.txt requirements_test.txt requirements_test_pre_commit.txt homeassistant/
RUN rm -rf requirements.txt requirements_test.txt requirements_test_pre_commit.txt homeassistant/

# Set the default shell to bash instead of sh
ENV SHELL /bin/bash
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
"python.linting.pylintArgs": [
"--init-hook",
"import sys; sys.path.append('/srv/homeassistant/lib/python3.10/site-packages/')"
"import sys; sys.path.append('/srv/homeassistant/lib/python3.11/site-packages/')"
],
"python.autoComplete.extraPaths": [
"/srv/homeassistant/lib/python3.11/site-packages/"
]
},
// Add the IDs of extensions you want installed when the container is created.
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git+https://github.com/boto/botocore
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ 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

### 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

## [1.1.2] - 2023-06-16

### Fixed
Expand Down
4 changes: 4 additions & 0 deletions custom_components/awnet_local/const_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,15 @@
name="Evapotranspiration Short",
icon="mdi:waves-arrow-up",
native_unit_of_measurement=UnitOfVolumetricFlux.INCHES_PER_DAY,
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key=TYPE_ETRS,
name="Evapotranspiration Tall",
icon="mdi:waves-arrow-up",
native_unit_of_measurement=UnitOfVolumetricFlux.INCHES_PER_DAY,
device_class=SensorDeviceClass.PRECIPITATION_INTENSITY,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
Expand Down Expand Up @@ -436,6 +438,7 @@
name="Growing Degree Days",
icon="mdi:sprout",
native_unit_of_measurement=UnitOfTime.DAYS,
device_class=SensorDeviceClass.DURATION,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
Expand Down Expand Up @@ -604,6 +607,7 @@
name="Lightning Strike Distance",
icon="mdi:lightning-bolt",
native_unit_of_measurement=UnitOfLength.KILOMETERS,
device_class=SensorDeviceClass.DISTANCE,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
Expand Down