File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
custom_components/solaredge_modbus_multi Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2356,6 +2356,12 @@ def unique_id(self) -> str:
2356
2356
def name (self ) -> str :
2357
2357
return "Commit Power Settings"
2358
2358
2359
+ @property
2360
+ def available (self ) -> bool :
2361
+ return (
2362
+ super ().available and "CommitPwrCtlSettings" in self ._platform .decoded_model
2363
+ )
2364
+
2359
2365
@property
2360
2366
def native_value (self ):
2361
2367
return self ._platform .decoded_model ["CommitPwrCtlSettings" ]
@@ -2395,6 +2401,13 @@ def unique_id(self) -> str:
2395
2401
def name (self ) -> str :
2396
2402
return "Default Power Settings"
2397
2403
2404
+ @property
2405
+ def available (self ) -> bool :
2406
+ return (
2407
+ super ().available
2408
+ and "RestorePwrCtlDefaults" in self ._platform .decoded_model
2409
+ )
2410
+
2398
2411
@property
2399
2412
def native_value (self ):
2400
2413
return self ._platform .decoded_model ["RestorePwrCtlDefaults" ]
You can’t perform that action at this time.
0 commit comments