Skip to content

Commit

Permalink
fix: Register addresses for R134A circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
alepee committed Nov 17, 2024
1 parent f3e7dfe commit 6f05a68
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
18 changes: 10 additions & 8 deletions custom_components/hitachi_yutaki/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,20 @@
"pump_speed": 1221,
"dhw_temp": 1080,
"pool_temp": 1083,
"compressor_current": 1214,
"compressor_frequency": 1212,
}

# R134a specific registers (S80 only)
REGISTER_R134A = {
"discharge_temp": 1224,
"suction_temp": 1225,
"discharge_pressure": 1226,
"suction_pressure": 1227,
"frequency": 1228,
"valve_opening": 1229,
"current": 1230,
"retry_code": 1231,
"r134a_discharge_temp": 1224,
"r134a_suction_temp": 1225,
"r134a_discharge_pressure": 1226,
"r134a_suction_pressure": 1227,
"r134a_compressor_frequency": 1228,
"r134a_valve_opening": 1229,
"r134a_compressor_current": 1230,
"r134a_retry_code": 1231,
}

PLATFORMS = [
Expand Down
12 changes: 6 additions & 6 deletions custom_components/hitachi_yutaki/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,22 @@ class HitachiYutakiSensorEntityDescription(SensorEntityDescription):
entity_category=EntityCategory.DIAGNOSTIC,
),
HitachiYutakiSensorEntityDescription(
key="r134a_frequency",
name="R134a Frequency",
key="r134a_compressor_frequency",
name="R134a Compressor Frequency",
device_class=None,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfFrequency.HERTZ,
register_key="r134a_frequency",
register_key="r134a_compressor_frequency",
model_required=UNIT_MODEL_S80,
entity_category=EntityCategory.DIAGNOSTIC,
),
HitachiYutakiSensorEntityDescription(
key="r134a_current",
name="R134a Current",
key="r134a_compressor_current",
name="R134a Compressor Current",
device_class=SensorDeviceClass.CURRENT,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
register_key="r134a_current",
register_key="r134a_compressor_current",
needs_conversion=True,
model_required=UNIT_MODEL_S80,
entity_category=EntityCategory.DIAGNOSTIC,
Expand Down

0 comments on commit 6f05a68

Please sign in to comment.