Skip to content

Commit

Permalink
- new charge&discharge management v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ajan1 committed Oct 25, 2024
1 parent bd691a2 commit b768608
Show file tree
Hide file tree
Showing 4 changed files with 554 additions and 0 deletions.
108 changes: 108 additions & 0 deletions custom_components/solis_modbus/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,114 @@ async def async_setup_entry(hass, config_entry: ConfigEntry, async_add_devices):
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},


{"type": "SNE", "name": "Solis Timed Charge Current (Slot 1)", "register": 43709,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Charge Current (Slot 2)", "register": 43716,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Charge Current (Slot 3)", "register": 43723,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Charge Current (Slot 4)", "register": 43730,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Charge Current (Slot 5)", "register": 43737,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Charge Current (Slot 6)", "register": 43744,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},


{"type": "SNE", "name": "Solis Timed Charge SOC (Slot 1)", "register": 43708,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Charge SOC (Slot 2)", "register": 43715,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Charge SOC (Slot 3)", "register": 43722,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Charge SOC (Slot 4)", "register": 43729,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Charge SOC (Slot 5)", "register": 43736,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Charge SOC (Slot 6)", "register": 43743,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},

{"type": "SNE", "name": "Solis Timed Discharge Current (Slot 1)", "register": 43751,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},

{"type": "SNE", "name": "Solis Timed Discharge Current (Slot 2)", "register": 43758,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},

{"type": "SNE", "name": "Solis Timed Discharge Current (Slot 3)", "register": 43765,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},

{"type": "SNE", "name": "Solis Timed Discharge Current (Slot 4)", "register": 43772,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},

{"type": "SNE", "name": "Solis Timed Discharge Current (Slot 5)", "register": 43779,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},

{"type": "SNE", "name": "Solis Timed Discharge Current (Slot 6)", "register": 43786,
"default": 50.0, "multiplier": 10,
"min_val": 0, "max_val": 135, "step": 0.1, "device_class": SensorDeviceClass.CURRENT,
"unit_of_measurement": UnitOfElectricCurrent.AMPERE, "enabled": True},


{"type": "SNE", "name": "Solis Timed Discharge SOC (Slot 1)", "register": 43750,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Discharge SOC (Slot 2)", "register": 43757,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Discharge SOC (Slot 3)", "register": 43764,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Discharge SOC (Slot 4)", "register": 43771,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Discharge SOC (Slot 5)", "register": 43778,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
{"type": "SNE", "name": "Solis Timed Discharge SOC (Slot 6)", "register": 43785,
"default": 10, "multiplier": 1,
"min_val": 0, "max_val": 100, "step": 1,
"unit_of_measurement": PERCENTAGE, "enabled": True},
]

for entity_definition in numbers:
Expand Down
Loading

0 comments on commit b768608

Please sign in to comment.