Closed mill1000 closed 1 month ago
Yes, find the log:
Thanks. Lets try a different value for disabling breezeless
Try this code
import asyncio
import logging
from msmart.device import AirConditioner as AC
from msmart.device.AC.command import PropertyId, SetPropertiesCommand
logging.basicConfig(level=logging.DEBUG)
DEVICE_IP = "YOUR_DEVICE_IP"
DEVICE_PORT = 6444
DEVICE_ID = "YOUR_AC_ID"
# For V3 devices
DEVICE_TOKEN = None # "YOUR_DEVICE_TOKEN"
DEVICE_KEY = None # "YOUR_DEVICE_KEY"
async def main():
device = AC(ip=DEVICE_IP, port=6444, device_id=int(DEVICE_ID))
if DEVICE_TOKEN and DEVICE_KEY:
await device.authenticate(DEVICE_TOKEN, DEVICE_KEY)
# Get device capabilities
await device.get_capabilities()
# Refresh the state
print("Refreshing state")
await device.refresh()
# Print current breeze properties
print({
'breeze_away': device.breeze_away,
"supports_breeze_away": device.supports_breeze_away,
'breeze_mild': device.breeze_mild,
"supports_breeze_mild": device.supports_breeze_mild,
"breezeless": device.breezeless,
"supports_breezeless": device.supports_breezeless,
})
print("Enabling Breezeless")
device.breezeless = True
await device.apply()
# Print current breeze properties
print({
'breeze_away': device.breeze_away,
'breeze_mild': device.breeze_mild,
"breezeless": device.breezeless,
})
await asyncio.sleep(10)
# Refresh the state
print("Refreshing state")
await device.refresh()
# Print current breeze properties
print({
'breeze_away': device.breeze_away,
'breeze_mild': device.breeze_mild,
"breezeless": device.breezeless,
})
print("Disabling Breezeless")
# Try 0x01 for disabling breezeless
await device._apply_properties({
PropertyId.BREEZE_CONTROL: 0x01,
})
# Print current breeze properties
print({
'breeze_away': device.breeze_away,
'breeze_mild': device.breeze_mild,
"breezeless": device.breezeless,
})
await asyncio.sleep(10)
# Refresh the state
print("Refreshing state")
await device.refresh()
# Print current breeze properties
print({
'breeze_away': device.breeze_away,
'breeze_mild': device.breeze_mild,
"breezeless": device.breezeless,
})
if __name__ == "__main__":
asyncio.run(main())
@lpispek Just checking if you saw this request.
Yes, sorry, on a business trip. Tomorrow I will be at home and test the script.
No problem. Thanks for your help as always.
I have tested with Breezless ON and OFF. After the script completes Breezless mode was OFF. OFF: breezless-OFF-debug.txt ON: breezless-ON-debug.txt
Originally reported here https://github.com/mill1000/midea-ac-py/issues/212
@lpispek @Jarrekstar Can you try running this example?