11"""Client for the Elmax Cloud services."""
22from yarl import URL
3- import asyncio
43import logging
54import httpx
65import json
@@ -88,18 +87,18 @@ def control_panels(self):
8887 @property
8988 def endpoints (self ):
9089 """Get the endpoints."""
91- raise NotImplemented
90+ raise NotImplementedError
9291
9392 @property
9493 def zones (self ):
9594 """Get the zones."""
9695 return self ._zones
97-
96+
9897 @property
9998 def outputs (self ):
10099 """Get the outputs."""
101100 return self ._outputs
102-
101+
103102 @property
104103 def areas (self ):
105104 """Get the areas."""
@@ -119,7 +118,9 @@ async def get_control_panels(self):
119118 _LOGGER .debug ("Status code:" , response .status_code )
120119
121120 for response_entry in response .json ():
122- control_panel = AvailableControlPanel .create_new_control_panel (response_entry )
121+ control_panel = AvailableControlPanel .create_new_control_panel (
122+ response_entry
123+ )
123124 self .registry .register (control_panel )
124125
125126 async def list_control_panels (self ):
@@ -129,7 +130,11 @@ async def list_control_panels(self):
129130 control_panels_list = []
130131 for control_panel in self .registry .devices ():
131132 control_panels_list .append (
132- {"online" : control_panel .online , "hash" : control_panel .hash , "name" : control_panel .name }
133+ {
134+ "online" : control_panel .online ,
135+ "hash" : control_panel .hash ,
136+ "name" : control_panel .name ,
137+ }
133138 )
134139
135140 return control_panels_list
@@ -189,6 +194,7 @@ def create_new_control_panel(response_entry):
189194 )
190195 return control_panel
191196
197+
192198class DeviceRegistry (object ):
193199 """Representation of the devices registry."""
194200
0 commit comments