Skip to content

Commit

Permalink
Merge pull request #8 from faizpuru/hvac_action_improvement
Browse files Browse the repository at this point in the history
add idle/mode action
  • Loading branch information
faizpuru authored Feb 3, 2025
2 parents 994539f + c7759a2 commit 4a3e32c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions custom_components/pilot_wire_climate/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,17 @@ def supported_features(self) -> ClimateEntityFeature:
def update(self) -> None:
"""Update unit attributes."""

# Temperature
@property
def hvac_action(self) -> str:
"""Return the unit of measurement."""
value = None
if self._cur_power:
value = HVACAction.IDLE
if self._cur_power is not None:
if self._cur_power > self.power_threshold:
value = HVACAction.HEATING
elif self.preset_mode == PRESET_NONE:
value = HVACAction.OFF
else:
value = HVACAction.IDLE
return value

@property
Expand Down
2 changes: 1 addition & 1 deletion custom_components/pilot_wire_climate/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"integration_type": "helper",
"iot_class": "local_polling",
"issue_tracker": "https://github.com/faizpuru/ha-pilot-wire-climate/issues",
"version": "1.0.2"
"version": "1.0.3"
}

0 comments on commit 4a3e32c

Please sign in to comment.