@@ -247,6 +247,18 @@ def value_function_combined_battery_power(initval, descr, datadict):
247
247
# Normal select types
248
248
#
249
249
###
250
+ GrowattModbusSelectEntityDescription (
251
+ name = "Select baud rate" ,
252
+ key = "select_baud_rate" ,
253
+ register = 22 ,
254
+ option_dict = {
255
+ 0 : "9600bps" ,
256
+ 1 : "38400bps" , },
257
+ allowedtypes = GEN | GEN2 | GEN3 | GEN4 ,
258
+ entity_category = EntityCategory .CONFIG ,
259
+ entity_registry_enabled_default = False ,
260
+ icon = "mdi:dip-switch" ,
261
+ ),
250
262
GrowattModbusSelectEntityDescription (
251
263
name = "Limit Grid Export" ,
252
264
key = "limit_grid_export" ,
@@ -260,7 +272,6 @@ def value_function_combined_battery_power(initval, descr, datadict):
260
272
entity_category = EntityCategory .CONFIG ,
261
273
icon = "mdi:transmission-tower-export" ,
262
274
),
263
-
264
275
###
265
276
# Battery First (4-6)
266
277
###
@@ -946,6 +957,16 @@ def value_function_combined_battery_power(initval, descr, datadict):
946
957
entity_registry_enabled_default = False ,
947
958
icon = "mdi:translate-variant" ,
948
959
),
960
+ GrowattModbusSensorEntityDescription (
961
+ name = "Select baud rate" ,
962
+ key = "select_baud_rate" ,
963
+ register = 22 ,
964
+ scale = { 0 : "9600bps" ,
965
+ 1 : "38400bps" , },
966
+ allowedtypes = GEN | GEN2 | GEN3 | GEN4 ,
967
+ entity_registry_enabled_default = False ,
968
+ icon = "mdi:dip-switch" ,
969
+ ),
949
970
GrowattModbusSensorEntityDescription (
950
971
name = "Serial Number" ,
951
972
key = "serialnumber" ,
@@ -2635,7 +2656,8 @@ def value_function_combined_battery_power(initval, descr, datadict):
2635
2656
4 : "Update Mode" ,
2636
2657
5 : "PV Bat Online" ,
2637
2658
6 : "Bat Online" ,
2638
- 8 : "Normal Mode" , },
2659
+ 8 : "Normal Mode" ,
2660
+ 9 : "Bypass" },
2639
2661
register_type = REG_INPUT ,
2640
2662
allowedtypes = GEN | GEN2 ,
2641
2663
icon = "mdi:run" ,
@@ -4866,15 +4888,6 @@ def value_function_combined_battery_power(initval, descr, datadict):
4866
4888
@dataclass
4867
4889
class growatt_plugin (plugin_base ):
4868
4890
4869
- """
4870
- def isAwake(self, datadict):
4871
- return (datadict.get('run_mode', None) == 'Normal Mode')
4872
-
4873
- def wakeupButton(self):
4874
- return 'battery_awaken'
4875
- """
4876
-
4877
-
4878
4891
async def async_determineInverterType (self , hub , configdict ):
4879
4892
_LOGGER .info (f"{ hub .name } : trying to determine inverter type" )
4880
4893
seriesnumber = await async_read_serialnr (hub , 9 )
@@ -4927,7 +4940,6 @@ def matchInverterWithMask (self, inverterspec, entitymask, serialnumber = 'not r
4927
4940
if serialnumber .startswith (start ) : blacklisted = True
4928
4941
return (genmatch and xmatch and hybmatch and epsmatch and dcbmatch and mpptmatch ) and not blacklisted
4929
4942
4930
-
4931
4943
plugin_instance = growatt_plugin (
4932
4944
plugin_name = 'Growatt' ,
4933
4945
plugin_manufacturer = 'Growatt New Energy' ,
@@ -4938,4 +4950,4 @@ def matchInverterWithMask (self, inverterspec, entitymask, serialnumber = 'not r
4938
4950
block_size = 100 ,
4939
4951
order16 = Endian .BIG ,
4940
4952
order32 = Endian .BIG ,
4941
- )
4953
+ )
0 commit comments