-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(c3): add option to set super_silent (#210)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new silent level feature for C3 devices, allowing users to set silence modes to OFF, SILENT, and SUPER_SILENT. - **Refactor** - Updated message handling to incorporate the new silent level feature. - **Tests** - Added test cases to validate the new silent level functionality and message handling improvements. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Loading branch information
Showing
5 changed files
with
418 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
"""Midea local C3 device const.""" | ||
|
||
from enum import IntEnum, StrEnum | ||
|
||
|
||
class DeviceAttributes(StrEnum): | ||
"""Midea C3 device attributes.""" | ||
|
||
zone1_power = "zone1_power" | ||
zone2_power = "zone2_power" | ||
dhw_power = "dhw_power" | ||
zone1_curve = "zone1_curve" | ||
zone2_curve = "zone2_curve" | ||
disinfect = "disinfect" | ||
fast_dhw = "fast_dhw" | ||
zone_temp_type = "zone_temp_type" | ||
zone1_room_temp_mode = "zone1_room_temp_mode" | ||
zone2_room_temp_mode = "zone2_room_temp_mode" | ||
zone1_water_temp_mode = "zone1_water_temp_mode" | ||
zone2_water_temp_mode = "zone2_water_temp_mode" | ||
mode = "mode" | ||
mode_auto = "mode_auto" | ||
zone_target_temp = "zone_target_temp" | ||
dhw_target_temp = "dhw_target_temp" | ||
room_target_temp = "room_target_temp" | ||
zone_heating_temp_max = "zone_heating_temp_max" | ||
zone_heating_temp_min = "zone_heating_temp_min" | ||
zone_cooling_temp_max = "zone_cooling_temp_max" | ||
zone_cooling_temp_min = "zone_cooling_temp_min" | ||
tank_actual_temperature = "tank_actual_temperature" | ||
room_temp_max = "room_temp_max" | ||
room_temp_min = "room_temp_min" | ||
dhw_temp_max = "dhw_temp_max" | ||
dhw_temp_min = "dhw_temp_min" | ||
target_temperature = "target_temperature" | ||
temperature_max = "temperature_max" | ||
temperature_min = "temperature_min" | ||
status_heating = "status_heating" | ||
status_dhw = "status_dhw" | ||
status_tbh = "status_tbh" | ||
status_ibh = "status_ibh" | ||
total_energy_consumption = "total_energy_consumption" | ||
total_produced_energy = "total_produced_energy" | ||
outdoor_temperature = "outdoor_temperature" | ||
silent_mode = "silent_mode" | ||
SILENT_LEVEL = "silent_level" | ||
eco_mode = "eco_mode" | ||
tbh = "tbh" | ||
error_code = "error_code" | ||
|
||
|
||
class C3SilentLevel(IntEnum): | ||
"""C3 Silent Level.""" | ||
|
||
OFF = 0x0 | ||
SILENT = 0x1 | ||
SUPER_SILENT = 0x3 | ||
|
||
|
||
class C3DeviceMode(IntEnum): | ||
"""C3 Device Mode.""" | ||
|
||
COOL = 2 | ||
HEAT = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.