Skip to content

Commit

Permalink
Fix HVAC mode when unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
comtef committed Feb 12, 2024
1 parent a051663 commit 3d835b0
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Validate

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

jobs:
validate-hacs:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- name: HACS validation
uses: "hacs/action@main"
with:
category: "integration"
2 changes: 1 addition & 1 deletion custom_components/melzone_building/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def target_temperature_step(self) -> float | None:
@property
def hvac_mode(self) -> HVACMode | None:
"""Return hvac operation ie. heat, cool mode."""
mode = HVAC_MODE_LOOKUP[self.device.operation_mode]
mode = HVAC_MODE_LOOKUP.get(self.device.operation_mode)
if not self.device.power or mode is None:
return HVACMode.OFF
return mode
Expand Down
11 changes: 7 additions & 4 deletions custom_components/melzone_building/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"codeowners": ["@comtef"],
"codeowners": [
"@comtef"
],
"config_flow": true,
"dependencies": [],
"issue_tracker": "https://github.com/comtef/melzone-building/issues",
"documentation": "https://github.com/comtef/melzone-building",
"domain": "melzone_building",
"iot_class": "local_polling",
"name": "Melzone Building",
"requirements": [],
"version": "0.1.0"
}
"iot_class": "local_polling",
"version": "0.1.1"
}
9 changes: 7 additions & 2 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"name": "Melzone Building",
"filename": "melzone_building.zip",
"hide_default_branch": true,
"render_readme": true,
"iot_class": "local_polling"
}
"zip_release": true,
"country": [
"FR"
]
}

0 comments on commit 3d835b0

Please sign in to comment.