Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixes and improvements for NeoStatHC #247

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/heatmiserneo/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def target_temperature_high(self):
def target_temperature_low(self):
"""Return the temperature we try to reach."""
target = float(self.data.target_temperature)
if self.hvac_action() != HVACAction.OFF and target < 255:
if self.hvac_action != HVACAction.OFF and target < 255:
return target
return None

Expand Down
2 changes: 2 additions & 0 deletions custom_components/heatmiserneo/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
FAN_HIGH,
FAN_LOW,
FAN_MEDIUM,
FAN_OFF,
UnitOfTemperature,
)

Expand Down Expand Up @@ -155,6 +156,7 @@ class ModeSelectOption(str, enum.Enum):
"Medium": FAN_MEDIUM,
"Low": FAN_LOW,
"Auto": FAN_AUTO,
"Off": FAN_OFF,
}


Expand Down
12 changes: 12 additions & 0 deletions custom_components/heatmiserneo/icons.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{
"entity": {
"sensor": {
"fan_speed": {
"default": "mdi:fan",
"state": {
"auto": "mdi:fan-auto",
"off": "mdi:fan-off",
"low": "mdi:fan-speed-1",
"medium": "mdi:fan-speed-2",
"high": "mdi:fan-speed-3"
}
}
},
"select": {
"switching_differential": {
"default": "mdi:thermometer"
Expand Down
8 changes: 5 additions & 3 deletions custom_components/heatmiserneo/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,11 @@ class HeatmiserNeoHubSensorEntityDescription(
key="heatmiser_neo_stat_hc_fan_speed",
device_class=SensorDeviceClass.ENUM,
options=[FAN_OFF, FAN_HIGH, FAN_MEDIUM, FAN_LOW, FAN_AUTO],
name="Fan Speed",
value_fn=lambda device: HEATMISER_FAN_SPEED_HA_FAN_MODE.get(
device.data.fan_speed
translation_key="fan_speed",
value_fn=lambda device: (
FAN_AUTO
if device.data.fan_control != "Manual"
else HEATMISER_FAN_SPEED_HA_FAN_MODE.get(device.data.fan_speed, FAN_OFF)
),
setup_filter_fn=lambda device, _: (
device.device_type in HEATMISER_TYPE_IDS_HC and not device.time_clock_mode
Expand Down
10 changes: 10 additions & 0 deletions custom_components/heatmiserneo/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@
}
},
"sensor": {
"fan_speed": {
"name": "Fan Speed",
"state": {
"auto": "Auto",
"off": "Off",
"low": "Low",
"medium": "Medium",
"high": "High"
}
},
"hub_profile_format": {
"name": "Profile Format",
"state": {
Expand Down
10 changes: 10 additions & 0 deletions custom_components/heatmiserneo/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@
}
},
"sensor": {
"fan_speed": {
"name": "Fan Speed",
"state": {
"auto": "Auto",
"off": "Off",
"low": "Low",
"medium": "Medium",
"high": "High"
}
},
"hub_profile_format": {
"name": "Profile Format",
"state": {
Expand Down
Loading