mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-06-21 15:20:00 +08:00
Merge pull request #135 from XiaoMi/feat_heater_devices
feat: support xiaomi heater devices
This commit is contained in:
@ -1760,7 +1760,7 @@ class MIoTClient:
|
||||
delay_sec, self.__show_devices_changed_notify)
|
||||
|
||||
|
||||
@ staticmethod
|
||||
@staticmethod
|
||||
async def get_miot_instance_async(
|
||||
hass: HomeAssistant, entry_id: str, entry_data: Optional[dict] = None,
|
||||
persistent_notify: Optional[Callable[[str, str, str], None]] = None
|
||||
|
@ -564,11 +564,11 @@ class MIoTLan:
|
||||
0, lambda: self._main_loop.create_task(
|
||||
self.init_async()))
|
||||
|
||||
@ property
|
||||
@property
|
||||
def virtual_did(self) -> str:
|
||||
return self._virtual_did
|
||||
|
||||
@ property
|
||||
@property
|
||||
def mev(self) -> MIoTEventLoop:
|
||||
return self._mev
|
||||
|
||||
|
@ -208,9 +208,32 @@ SPEC_DEVICE_TRANS_MAP: dict[str, dict | str] = {
|
||||
}
|
||||
}
|
||||
},
|
||||
'entity': 'climate'
|
||||
'entity': 'air-conditioner'
|
||||
},
|
||||
'air-condition-outlet': 'air-conditioner'
|
||||
'air-condition-outlet': 'air-conditioner',
|
||||
'heater': {
|
||||
'required': {
|
||||
'heater': {
|
||||
'required': {
|
||||
'properties': {
|
||||
'on': {'read', 'write'}
|
||||
}
|
||||
},
|
||||
'optional': {
|
||||
'properties': {'target-temperature', 'heat-level'}
|
||||
},
|
||||
}
|
||||
},
|
||||
'optional': {
|
||||
'environment': {
|
||||
'required': {},
|
||||
'optional': {
|
||||
'properties': {'temperature', 'relative-humidity'}
|
||||
}
|
||||
},
|
||||
},
|
||||
'entity': 'heater'
|
||||
}
|
||||
}
|
||||
|
||||
"""SPEC_SERVICE_TRANS_MAP
|
||||
|
Reference in New Issue
Block a user