Coverage for python_carrier_infinity/gql_schemas/get_status.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2023-08-19 01:56 +0000

1"""getInfinityStatus GraphQL schema""" 

2 

3OPERATION = "getInfinityStatus" 

4QUERY_FULL = """query getInfinityStatus($serial: String!) { 

5 infinityStatus(serial: $serial) { 

6 localTime 

7 localTimeOffset 

8 utcTime 

9 wcTime 

10 isDisconnected 

11 cfgem 

12 mode 

13 vacatrunning 

14 oat 

15 odu { 

16 type 

17 opstat 

18 } 

19 filtrlvl 

20 idu { 

21 type 

22 opstat 

23 cfm 

24 } 

25 vent 

26 ventlvl 

27 humid 

28 humlvl 

29 uvlvl 

30 zones { 

31 id 

32 rt 

33 rh 

34 fan 

35 htsp 

36 clsp 

37 hold 

38 enabled 

39 currentActivity 

40 } 

41 } 

42}""" 

43 

44QUERY = """query getInfinityStatus($serial: String!) { 

45 infinityStatus(serial: $serial) { 

46 utcTime 

47 cfgem 

48 mode 

49 oat 

50 odu { 

51 type 

52 opstat 

53 } 

54 idu { 

55 type 

56 opstat 

57 cfm 

58 } 

59 humid 

60 zones { 

61 id 

62 rt 

63 rh 

64 fan 

65 htsp 

66 clsp 

67 hold 

68 enabled 

69 currentActivity 

70 } 

71 } 

72}""" 

73 

74 

75def get_status_query(serial: str) -> dict: 

76 """Generate GraphQL query for getInfinityStatus""" 

77 return { 

78 "operationName": OPERATION, 

79 "variables": {"serial": serial}, 

80 "query": QUERY, 

81 }