Closed lecocqe closed 3 years ago
Hello,
see here: https://github.com/thomasgermain/pymultiMATIC/blob/master/pymultimatic/systemmanager.py#L249 you have to provide start_date, end_date and the target temperature
ok found error.
#!/usr/bin/env python3
import datetime as dt
import asyncio
import sys
import aiohttp
from asyncio.tasks import sleep, wait
from pymultimatic.systemmanager import SystemManager
from pymultimatic.model import System
from time import sleep
async def main(user, passw):
async with aiohttp.ClientSession() as session:
print('Trying to connect with user ' + user)
manager = SystemManager(user, passw, session)
system = await manager.set_holiday_mode(dt.datetime.now(), dt.datetime.now() + dt.timedelta(3),19.9)
if __name__ == "__main__":
user = 'x'
passw = 'x'
asyncio.run(main(user, passw))
this works but gives the following (maybe basic, but i'm newbee):
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000197F35171F0>
Traceback (most recent call last):
File "C:\Users\601570859\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Users\601570859\AppData\Local\Programs\Python\Python38\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Users\601570859\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 719, in call_soon
self._check_closed()
File "C:\Users\601570859\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 508, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
you can use asyncio.get_event_loop().run_until_complete(main(user, passw)
Hello Thomas,
trying to use pymultimatic, i got the following question: i try to set holiday mode via the following script:
i can't find my way.
Best regards,