Skip to content

Commit

Permalink
Merge pull request #8 from Pho3niX90/feature/pv_sensors
Browse files Browse the repository at this point in the history
feat: add pv meters
  • Loading branch information
Pho3niX90 authored Dec 4, 2023
2 parents 51ec0cb + 8fbb612 commit 1d268eb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/solis_modbus/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DOMAIN = "solis_modbus"
CONTROLLER = "modbus_controller"
VERSION = "1.0.6"
VERSION = "1.0.7"
POLL_INTERVAL_SECONDS = 5
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.0.6"
"version": "1.0.7"
}
29 changes: 29 additions & 0 deletions custom_components/solis_modbus/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,35 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
hass.data[DOMAIN]['values'] = {}

sensors = [
{
"register_start": 33049,
"entities": [
{"type": "SS", "name": "Solis Inverter PV Total Energy Generation",
"unique": "solis_modbus_inverter_pv_total_generation",
"register": ['33029', '33030'], "device_class": SensorDeviceClass.ENERGY,
"decimal_places": 0,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR,
"state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis Inverter PV Current Month Energy Generation",
"unique": "solis_modbus_inverter_pv_current_month_generation",
"register": ['33031', '33032'], "device_class": SensorDeviceClass.ENERGY,
"decimal_places": 0,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR,
"state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis Inverter PV Last Month Energy Generation",
"unique": "solis_modbus_inverter_pv_last_month_generation",
"register": ['33033', '33034'], "device_class": SensorDeviceClass.ENERGY,
"decimal_places": 0,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR,
"state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis Inverter PV Today Energy Generation",
"unique": "solis_modbus_inverter_pv_today_generation",
"register": ['33035'], "device_class": SensorDeviceClass.ENERGY,
"decimal_places": 1,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR,
"state_class": SensorStateClass.TOTAL_INCREASING},
]
},
{
"register_start": 33049,
"entities": [
Expand Down

0 comments on commit 1d268eb

Please sign in to comment.