Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Apr 9, 2024
1 parent 6b67f35 commit 466926c
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 86 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
ignore:
# Dependabot should not update Home Assistant as that should match the homeassistant key in hacs.json
- dependency-name: "homeassistant"
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Lint"

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"

jobs:
build:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies from requirements.txt
run: |
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
- name: Analyse the code with ruff
run: |
python3 -m ruff check .
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Release"

on:
release:
types:
- "published"

permissions: {}

jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
permissions:
contents: write
steps:
- name: "Checkout the repository"
uses: "actions/[email protected]"

- name: "Adjust version number"
shell: "bash"
run: |
yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
"${{ github.workspace }}/custom_components/hive_mqtt_orchestrator/manifest.json"
- name: "ZIP the integration directory"
shell: "bash"
run: |
cd "${{ github.workspace }}/custom_components/hive_mqtt_orchestrator"
zip hive_mqtt_orchestrator.zip -r ./
- name: "Upload the ZIP file to the release"
uses: softprops/[email protected]
with:
files: ${{ github.workspace }}/custom_components/hive_mqtt_orchestrator/hive_mqtt_orchestrator.zip
35 changes: 35 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Validate"

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches:
- "main"
pull_request:
branches:
- "main"

jobs:
hassfest: # https://developers.home-assistant.io/blog/2020/04/16/hassfest
name: "Hassfest Validation"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/[email protected]"

- name: "Run hassfest validation"
uses: "home-assistant/actions/hassfest@master"

hacs: # https://github.com/hacs/action
name: "HACS Validation"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/[email protected]"

- name: "Run HACS validation"
uses: "hacs/action@main"
with:
category: "integration"
90 changes: 4 additions & 86 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# HA-Hive-MQTT-Orchestrator
Local Hive Thermostat MQTT integration Home Assistant

Early dev, nothing to see yet
## Early beta

To use this integration your Hive thermostat receiver must be added to [Zigbee2MQTT](https://www.zigbee2mqtt.io/supported-devices/#v=Hive).
To use this integration your Hive thermostat receiver must be added to [Zigbee2MQTT](https://www.zigbee2mqtt.io/supported-devices/#v=Hive) and a MQTT broker and the MQTT integration within Home Assistant must be correctly configured.

Zigbee2MQTT will expose the native sensors but Hive requires specific message structures to be sent for setting modes and a combination of sensor values to determine the modes, this integration creates controls and sensors that correctly interface with the native hive values/methods.
Zigbee2MQTT will expose the native sensors but Hive requires specific message structures to be sent for setting modes and a combination of sensor values to determine the modes, this integration creates controls and sensors that correctly interface with the native Hive values/methods.

SLR1x and SLR2x thermostats are supported, though this has only been tested with an SLR2c.

Expand All @@ -15,89 +15,7 @@ The new device created will have new sensors/controls available that will accura

You can optionally hide/disable the native Hive device created by Zigbee2MQTT within HomeAssistant.

The integration supports native boost and native schedules. With schedules you can switch on/off schedule mode but you cannot modify the schedule details via the integration. You can of course ignore the schedule mode and setup automations within Home Assistant to control when heating/water is on or off and what temperature for heating.
The integration supports native boost and native schedules. With schedules you can switch on/off schedule mode but you cannot modify the schedule details via the integration. You can of course ignore the schedule mode and setup automations within Home Assistant to control when heating/water is on or off and set a temperature for heating.

The numeric entities allow you to set defaults for boost times, temperatures and also frost protection. Frost protection should be set to match what you have set on the Hive thermostat for an accurate display.


Example received json from zigbee2mqtt/Z2mHiveReceiver
```
{
"last_seen": "2024-04-04T09:18:37+01:00",
"linkquality": 109,
"local_temperature_heat": 20.28,
"local_temperature_water": 21,
"occupied_heating_setpoint_heat": 19,
"occupied_heating_setpoint_water": 22,
"running_state_heat": "idle",
"running_state_water": "idle",
"system_mode_heat": "heat",
"system_mode_water": "heat",
"temperature_setpoint_hold_duration_heat": 0,
"temperature_setpoint_hold_duration_water": 0,
"temperature_setpoint_hold_heat": false,
"temperature_setpoint_hold_water": false,
"weekly_schedule_heat": {
"days": [
"saturday"
],
"transitions": [
{
"heating_setpoint": 20,
"time": 420
},
{
"heating_setpoint": 19,
"time": 540
},
{
"heating_setpoint": 20,
"time": 1020
},
{
"heating_setpoint": 1,
"time": 1380
},
{
"heating_setpoint": 1,
"time": 1380
},
{
"heating_setpoint": 1,
"time": 1380
}
]
},
"weekly_schedule_water": {
"days": [
"saturday"
],
"transitions": [
{
"heating_setpoint": 99,
"time": 1200
},
{
"heating_setpoint": 0,
"time": 1320
},
{
"heating_setpoint": 0,
"time": 1320
},
{
"heating_setpoint": 0,
"time": 1320
},
{
"heating_setpoint": 0,
"time": 1320
},
{
"heating_setpoint": 0,
"time": 1320
}
]
}
}
```

0 comments on commit 466926c

Please sign in to comment.