diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 30bf892..691fce9 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d49f6e2..1377a4a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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. diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt new file mode 100644 index 0000000..370d671 --- /dev/null +++ b/.devcontainer/requirements.txt @@ -0,0 +1 @@ +git+https://github.com/boto/botocore \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d3d4c90..3f0a0dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/custom_components/awnet_local/const_sensor.py b/custom_components/awnet_local/const_sensor.py index 4aa2429..73bcdc6 100644 --- a/custom_components/awnet_local/const_sensor.py +++ b/custom_components/awnet_local/const_sensor.py @@ -401,6 +401,7 @@ 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( @@ -408,6 +409,7 @@ 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( @@ -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( @@ -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(