Skip to content

Commit

Permalink
add: clock registers (33025,33026,33027)
Browse files Browse the repository at this point in the history
add: total battery charge energy (33161,33162)
  • Loading branch information
Pho3niX90 committed Mar 6, 2024
1 parent 13684eb commit af1beca
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/solis_modbus/const.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DOMAIN = "solis_modbus"
CONTROLLER = "modbus_controller"
VERSION = "1.3.3"
VERSION = "1.3.4"
POLL_INTERVAL_SECONDS = 15
MANUFACTURER = "Solis"
MODEL = "S6"
2 changes: 1 addition & 1 deletion custom_components/solis_modbus/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"issue_tracker": "https://github.com/Pho3niX90/solis_modbus/issues",
"quality_scale": "silver",
"requirements": ["pymodbus==3.5.4"],
"version": "1.3.3"
"version": "1.3.4"
}
25 changes: 23 additions & 2 deletions custom_components/solis_modbus/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,25 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
]
},
{
"register_start": 33029,
"register_start": 33025,
"scan_interval": 60,
"entities": [

{"type": "SS", "name": "Solis Clock (Hours)",
"unique": "solis_modbus_inverter_clock_hours",
"register": ['33025'], "multiplier": 0,
"unit_of_measurement": UnitOfTime.HOURS, "state_class": SensorStateClass.MEASUREMENT},
{"type": "SS", "name": "Solis Clock (Minutes)",
"unique": "solis_modbus_inverter_clock_minutes",
"register": ['33026'], "multiplier": 0,
"unit_of_measurement": UnitOfTime.MINUTES, "state_class": SensorStateClass.MEASUREMENT},
{"type": "SS", "name": "Solis Clock (Seconds)",
"unique": "solis_modbus_inverter_clock_seconds",
"register": ['33027'], "multiplier": 0,
"unit_of_measurement": UnitOfTime.SECONDS, "state_class": SensorStateClass.MEASUREMENT},

{"type": "reserve", "register": ['33028']},

{"type": "SS", "name": "Solis PV Total Energy Generation",
"unique": "solis_modbus_inverter_pv_total_generation",
"register": ['33029', '33030'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 0,
Expand Down Expand Up @@ -276,9 +292,14 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
]
},
{
"register_start": 33163,
"register_start": 33161,
"scan_interval": 5,
"entities": [
{"type": "SS", "name": "Solis Total Battery Charge Energy",
"unique": "solis_modbus_inverter_total_battery_charge_energy",
"register": ['33161', '33162'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 0.1,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},

{"type": "SS", "name": "Solis Today Battery Charge Energy",
"unique": "solis_modbus_inverter_today_battery_charge_energy",
"register": ['33163'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 0.1,
Expand Down
1 change: 1 addition & 0 deletions docs/source/sensors.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ The following sensors are provided in the integration.
| Solis Backup Load power | POWER | WATT | MEASUREMENT | 33148 |
| Solis Battery Power | POWER | WATT | MEASUREMENT | 33149, 33150 |
| Solis AC Grid Port Power | POWER | WATT | MEASUREMENT | 33151, 33152 |
| Solis Total Battery Charge Energy | ENERGY | KILO_WATT_HOUR | TOTAL_INCREASING | 33161, 33162 |
| Solis Today Battery Charge Energy | ENERGY | KILO_WATT_HOUR | TOTAL_INCREASING | 33163 |
| Solis Yesterday Battery Charge Energy | ENERGY | KILO_WATT_HOUR | TOTAL_INCREASING | 33164 |
| Solis Total Battery Discharge Energy | ENERGY | KILO_WATT_HOUR | TOTAL_INCREASING | 33165, 33166 |
Expand Down

0 comments on commit af1beca

Please sign in to comment.