@@ -91,17 +91,16 @@ def manufacturer(self):
91
91
92
92
@property
93
93
def model (self ):
94
- if self .application ._znp .version == 1.2 :
95
- model = "CC2531"
96
- version = "Home 1.2"
97
- elif self .application ._znp .version == 3.0 :
98
- model = "CC2531"
99
- version = "3.0.1/3.0.2"
94
+ if self .application ._znp .version > 3.0 :
95
+ model = "CC1352/CC2652"
96
+ version = "3.30+"
100
97
else :
101
- model = "CC13X2/CC26X2 "
102
- version = "3.30.00/3.40.00/4.10.00 "
98
+ model = "CC2538" if self . application . _znp . nvram . align_structs else "CC2531 "
99
+ version = "Home 1.2" if self . application . _znp . version == 1.2 else "3.0.x "
103
100
104
- return f"{ model } , Z-Stack { version } "
101
+ build = self .application ._version_rsp .CodeRevision
102
+
103
+ return f"{ model } , Z-Stack { version } (build { build } )"
105
104
106
105
107
106
class ControllerApplication (zigpy .application .ControllerApplication ):
@@ -122,6 +121,7 @@ def __init__(self, config: conf.ConfigType):
122
121
123
122
self ._network_key = None
124
123
self ._network_key_seq = None
124
+ self ._version_rsp = None
125
125
self ._concurrent_requests_semaphore = None
126
126
self ._currently_waiting_requests = 0
127
127
self ._route_discovery_futures = {}
@@ -353,11 +353,11 @@ async def _startup(self, auto_form=False, force_form=False, read_only=False):
353
353
354
354
self ._concurrent_requests_semaphore = asyncio .Semaphore (max_concurrent_requests )
355
355
356
- version_rsp = await self ._znp .request (c .SYS .Version .Req ())
356
+ self . _version_rsp = await self ._znp .request (c .SYS .Version .Req ())
357
357
358
358
LOGGER .info ("Network settings" )
359
359
LOGGER .info (" Z-Stack version: %s" , self ._znp .version )
360
- LOGGER .info (" Z-Stack build id: %s" , version_rsp .CodeRevision )
360
+ LOGGER .info (" Z-Stack build id: %s" , self . _version_rsp .CodeRevision )
361
361
LOGGER .info (" Max concurrent requests: %s" , max_concurrent_requests )
362
362
LOGGER .info (" Channel: %s" , self .channel )
363
363
LOGGER .info (" PAN ID: 0x%04X" , self .pan_id )
0 commit comments