mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-03-31 06:45:26 +08:00
refactor: refactor climate.py (#614)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
* feat: add thermostat as climate entity * feat: add bath-heater as climate entity * refactor: climate entity * fix: thermostat on/off * fix: get the current fan mode * perf: get fan level * fix: fix climate hvac_mode * fix: misuse of getting key or value from dict[int, any] * style: add comments * style: format the file based on google style * fix: initialize _attr_hvac_modes * feat: add heat and defog mode of ptc bath heater --------- Co-authored-by: topsworld <sworldtop@gmail.com>
This commit is contained in:
parent
57422ddf0d
commit
20b0004746
File diff suppressed because it is too large
Load Diff
@ -224,6 +224,31 @@ SPEC_DEVICE_TRANS_MAP: dict = {
|
||||
'entity': 'air-conditioner'
|
||||
},
|
||||
'air-condition-outlet': 'air-conditioner',
|
||||
'thermostat': {
|
||||
'required': {
|
||||
'thermostat': {
|
||||
'required': {
|
||||
'properties': {
|
||||
'on': {'read', 'write'}
|
||||
}
|
||||
},
|
||||
'optional': {
|
||||
'properties': {
|
||||
'target-temperature', 'mode', 'fan-level',
|
||||
'temperature'}
|
||||
},
|
||||
}
|
||||
},
|
||||
'optional': {
|
||||
'environment': {
|
||||
'required': {},
|
||||
'optional': {
|
||||
'properties': {'temperature', 'relative-humidity'}
|
||||
}
|
||||
},
|
||||
},
|
||||
'entity': 'thermostat'
|
||||
},
|
||||
'heater': {
|
||||
'required': {
|
||||
'heater': {
|
||||
@ -246,6 +271,30 @@ SPEC_DEVICE_TRANS_MAP: dict = {
|
||||
},
|
||||
},
|
||||
'entity': 'heater'
|
||||
},
|
||||
'bath-heater': {
|
||||
'required': {
|
||||
'ptc-bath-heater': {
|
||||
'required': {},
|
||||
'optional': {
|
||||
'properties': {
|
||||
'target-temperature', 'heat-level',
|
||||
'temperature', 'mode'
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
'optional': {
|
||||
'fan-control': {
|
||||
'required': {},
|
||||
'optional': {
|
||||
'properties': {
|
||||
'on', 'fan-level', 'horizontal-swing', 'vertical-swing'
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
'entity': 'bath-heater',
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user