Skip to content

Commit

Permalink
Merge branch 'master' into add-garden-device
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdonenfeld authored Jun 24, 2024
2 parents c3fbbf3 + eb6d5b1 commit 9adaca7
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/scripts/update_hacs_manifest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Update the manifest file."""

import json
import os
import sys
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hacs-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: validation
uses: home-assistant/actions/hassfest@master

Expand All @@ -21,7 +21,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: checkout
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: validation
uses: "hacs/action@main"
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get version
id: version
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ jobs:
- name: Run tests
run: |
pip install pytest
pytest tests
pytest --cov=custom_components/aerogarden tests
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ __pycache__/
.idea
.DS_Store
.pytest_cache
.coverage
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: check-json
Expand All @@ -9,23 +9,23 @@ repos:
- id: detect-private-key
- id: fix-byte-order-marker
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.4.2
hooks:
- id: black
language_version: python3.9
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: [ --profile=black ]
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.21.0
rev: 0.28.5
hooks:
- id: check-github-actions
- id: check-github-workflows

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.1.0
hooks:
- id: flake8

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![hacs_badge](https://img.shields.io/badge/HACS-Custom-41BDF5.svg)](https://github.com/hacs/integration)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/jacobdonenfeld/homeassistant-aerogarden/master.svg)](https://results.pre-commit.ci/latest/github/jacobdonenfeld/homeassistant-aerogarden/master)
[![codecov](https://codecov.io/github/jacobdonenfeld/homeassistant-aerogarden/branch/master/graph/badge.svg?token=WTX0LQ6JGE)](https://codecov.io/github/jacobdonenfeld/homeassistant-aerogarden)


This is a custom component for [Home Assistant](http://home-assistant.io) that adds support for the Miracle Grow [AeroGarden](http://www.aerogarden.com) Wifi hydroponic gardens.
Expand Down
2 changes: 1 addition & 1 deletion custom_components/aerogarden/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def light_toggle(self, macaddr):
"chooseGarden": self.garden_property(macaddr, "chooseGarden"),
"userID": self._userid,
"plantConfig": '{ "lightTemp" : %d }'
% (self.garden_property(macaddr, "lightTemp"))
% (self.garden_property(macaddr, "lightTemp")),
# TODO: Light Temp may not matter, check.
}
)
Expand Down

0 comments on commit 9adaca7

Please sign in to comment.