Skip to content

Commit 36dc1fe

Browse files
authored
Merge pull request #191 from GrKoR/dev-Fahrenheit
fix: Fahrenheit support
2 parents fa0b698 + 8597e46 commit 36dc1fe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/aux_ac/aux_ac.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,13 +1476,12 @@ namespace esphome
14761476
small_info_body = (packet_small_info_body_t *)(_inPacket.body);
14771477

14781478
// в малом пакете передается большое количество установленных пользователем параметров работы
1479-
// stateFloat = 8 + (small_info_body->target_temp_int_and_v_louver >> 3) + 0.5 * (float)(small_info_body->target_temp_frac >> 7);
1480-
stateFloat = 8.0 + (float)(small_info_body->target_temp_int) + ((small_info_body->target_temp_frac_bool) ? 0.5 : 0.0);
1479+
// stateFloat = 8.0 + (float)(small_info_body->target_temp_int) + ((small_info_body->target_temp_frac_bool) ? 0.5 : 0.0);
1480+
stateFloat = 8.0 + (float)(small_info_body->target_temp_int) + (small_info_body->target_temp_frac_dec / 10.0);
14811481
stateChangedFlag = stateChangedFlag || (_current_ac_state.temp_target != stateFloat);
14821482
_current_ac_state.temp_target = stateFloat;
14831483
_current_ac_state.temp_target_matter = true;
14841484

1485-
// stateByte = small_info_body->target_temp_int_and_v_louver & AC_LOUVERV_MASK;
14861485
stateByte = small_info_body->v_louver;
14871486
stateChangedFlag = stateChangedFlag || (_current_ac_state.louver.louver_v != (ac_louver_V)stateByte);
14881487
_current_ac_state.louver.louver_v = (ac_louver_V)stateByte;
@@ -1946,6 +1945,7 @@ namespace esphome
19461945
{
19471946
pack->body[4] = (pack->body[4] & ~AC_TEMP_TARGET_FRAC_PART_MASK);
19481947
}
1948+
pack->body[14] = ((uint8_t)(cmd->temp_target * 10)) % 10;
19491949
}
19501950

19511951
// значение ограничения мощности инвертора

components/aux_ac/climate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
ClimateSwingMode,
3535
)
3636

37-
AUX_AC_FIRMWARE_VERSION = '0.3.1'
37+
AUX_AC_FIRMWARE_VERSION = '0.3.2'
3838
AC_PACKET_TIMEOUT_MIN = 150
3939
AC_PACKET_TIMEOUT_MAX = 600
4040
AC_POWER_LIMIT_MIN = 30

0 commit comments

Comments
 (0)