Skip to content

Commit 40a79dc

Browse files
authored
Merge pull request #101 from hultenvp/93_add_solarman_battery_and_temp_sensors
93 add solarman battery and temp sensors
2 parents 323b985 + 1a74cbf commit 40a79dc

File tree

5 files changed

+32
-4
lines changed

5 files changed

+32
-4
lines changed

custom_components/solis/const.py

+16
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@
8686
STATE_CLASS_MEASUREMENT,
8787
INVERTER_TEMPERATURE
8888
],
89+
'radiatortemperature1': [
90+
'Radiator temperature 1', # Solarman only
91+
TEMP_CELSIUS,
92+
'mdi:thermometer',
93+
DEVICE_CLASS_TEMPERATURE,
94+
STATE_CLASS_MEASUREMENT,
95+
RADIATOR1_TEMP
96+
],
8997
'dcinputvoltagepv1': [
9098
'DC Voltage PV1',
9199
ELECTRIC_POTENTIAL_VOLT,
@@ -286,6 +294,14 @@
286294
STATE_CLASS_TOTAL_INCREASING,
287295
INVERTER_ENERGY_TOTAL_LIFE
288296
],
297+
'batpack1capacityremaining': [
298+
'Battery pack 1 remaining battery capacity', # Solarman only
299+
PERCENTAGE,
300+
'mdi:battery',
301+
DEVICE_CLASS_BATTERY,
302+
STATE_CLASS_MEASUREMENT,
303+
BAT1_REMAINING_CAPACITY
304+
],
289305
'batteryPower': [
290306
'Battery Power',
291307
POWER_WATT,

custom_components/solis/ginlong_api.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
_LOGGER = logging.getLogger(__name__)
2222

2323
# VERSION
24-
VERSION = '0.1.5'
24+
VERSION = '0.2.0'
2525

2626
# Response constants
2727
SUCCESS = 'Success'
@@ -68,6 +68,16 @@
6868
INVERTER_POWER_STATE: ['1fd', int, None],
6969
}
7070
],
71+
'realTimeDataTemp': [
72+
VALUE_RECORD, {
73+
RADIATOR1_TEMP: ['1to', int, None],
74+
}
75+
],
76+
'realTimeDataBattery': [
77+
VALUE_RECORD, {
78+
BAT1_REMAINING_CAPACITY: ['3je', int, None],
79+
}
80+
],
7181
'realTimeDataPower': [
7282
VALUE_RECORD, {
7383
INVERTER_ACPOWER: ['1ao', float, 2],

custom_components/solis/ginlong_const.py

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
INVERTER_ENERGY_TOTAL_LIFE = 'energyTotalLife'
3030
INVERTER_POWER_STATE = "powerState"
3131
INVERTER_STATE = "state"
32+
RADIATOR1_TEMP = "radiatorTemp1"
3233
STRING1_VOLTAGE = 'dcVoltage1'
3334
STRING2_VOLTAGE = 'dcVoltage2'
3435
STRING3_VOLTAGE = 'dcVoltage3'
@@ -47,6 +48,7 @@
4748
PHASE1_CURRENT = 'acCurrent1'
4849
PHASE2_CURRENT = 'acCurrent2'
4950
PHASE3_CURRENT = 'acCurrent3'
51+
BAT1_REMAINING_CAPACITY = 'packRemainingCapacity1'
5052
BAT_POWER = 'batteryPower'
5153
BAT_REMAINING_CAPACITY = 'remainingCapacity'
5254
BAT_TOTAL_ENERGY_CHARGED = 'totalEnergyCharged'

custom_components/solis/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"domain": "solis",
3-
"version": "2.0.7",
3+
"version": "2.1.0",
44
"name": "Solis Inverter",
5-
"iot_class": "cloud_polling",
5+
"iot_class": "cloud_push",
66
"documentation": "https://github.com/hultenvp/solis-sensor/",
77
"issue_tracker": "https://github.com/hultenvp/solis-sensor/issues",
88
"dependencies": [],

custom_components/solis/sensor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
_LOGGER = logging.getLogger(__name__)
4545

4646
# VERSION
47-
VERSION = '2.0.7'
47+
VERSION = '2.1.0'
4848

4949
LAST_UPDATED = 'Last updated'
5050
SERIAL = 'Inverter serial'

0 commit comments

Comments
 (0)