File tree Expand file tree Collapse file tree 3 files changed +86
-0
lines changed
Expand file tree Collapse file tree 3 files changed +86
-0
lines changed Original file line number Diff line number Diff line change 1+ from .accessory_power import enable_keep_accessory_power_mode
2+ from .accessory_power import disable_keep_accessory_power_mode
13from .battery_health import get_battery_health
24from .battery import get_battery
35from .boombox import boombox
4042from .idles import get_idles
4143from .keyless_driving import enable_keyless_driving
4244from .lights import flash_lights
45+ from .low_power_mode import enable_low_power_mode
46+ from .low_power_mode import disable_low_power_mode
4347from .scheduling import set_scheduled_charging
4448from .scheduling import set_scheduled_departure
4549from .sentry_mode import enable_sentry_mode
Original file line number Diff line number Diff line change 1+ import aiohttp
2+ from typing import Any , Dict
3+ from .tessie_wrapper import tessieRequest
4+
5+
6+ async def enable_keep_accessory_power_mode (
7+ session : aiohttp .ClientSession ,
8+ vin : str ,
9+ api_key : str ,
10+ max_attempts : int = 3 ,
11+ wait_for_completion : bool = True ,
12+ ) -> Dict [str , Any ]:
13+ return await tessieRequest (
14+ session ,
15+ "POST" ,
16+ f"/{ vin } /command/enable_keep_accessory_power_mode" ,
17+ api_key ,
18+ params = {
19+ "max_attempts" : max_attempts ,
20+ "wait_for_completion" : str (wait_for_completion ).lower (),
21+ },
22+ )
23+
24+
25+ async def disable_keep_accessory_power_mode (
26+ session : aiohttp .ClientSession ,
27+ vin : str ,
28+ api_key : str ,
29+ max_attempts : int = 3 ,
30+ wait_for_completion : bool = True ,
31+ ) -> Dict [str , Any ]:
32+ return await tessieRequest (
33+ session ,
34+ "POST" ,
35+ f"/{ vin } /command/disable_keep_accessory_power_mode" ,
36+ api_key ,
37+ params = {
38+ "max_attempts" : max_attempts ,
39+ "wait_for_completion" : str (wait_for_completion ).lower (),
40+ },
41+ )
Original file line number Diff line number Diff line change 1+ import aiohttp
2+ from typing import Any , Dict
3+ from .tessie_wrapper import tessieRequest
4+
5+
6+ async def enable_low_power_mode (
7+ session : aiohttp .ClientSession ,
8+ vin : str ,
9+ api_key : str ,
10+ max_attempts : int = 3 ,
11+ wait_for_completion : bool = True ,
12+ ) -> Dict [str , Any ]:
13+ return await tessieRequest (
14+ session ,
15+ "POST" ,
16+ f"/{ vin } /command/enable_low_power_mode" ,
17+ api_key ,
18+ params = {
19+ "max_attempts" : max_attempts ,
20+ "wait_for_completion" : str (wait_for_completion ).lower (),
21+ },
22+ )
23+
24+
25+ async def disable_low_power_mode (
26+ session : aiohttp .ClientSession ,
27+ vin : str ,
28+ api_key : str ,
29+ max_attempts : int = 3 ,
30+ wait_for_completion : bool = True ,
31+ ) -> Dict [str , Any ]:
32+ return await tessieRequest (
33+ session ,
34+ "POST" ,
35+ f"/{ vin } /command/disable_low_power_mode" ,
36+ api_key ,
37+ params = {
38+ "max_attempts" : max_attempts ,
39+ "wait_for_completion" : str (wait_for_completion ).lower (),
40+ },
41+ )
You can’t perform that action at this time.
0 commit comments