Skip to content

Commit

Permalink
fix: yearly & monthly factor. fixes #52
Browse files Browse the repository at this point in the history
  • Loading branch information
Pho3niX90 committed May 4, 2024
1 parent 84bc1cf commit feb6522
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions custom_components/solis_modbus/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis PV Current Month Energy Generation",
"unique": "solis_modbus_inverter_pv_current_month_generation",
"register": ['33031', '33032'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 0,
"register": ['33031', '33032'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 1,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis PV Last Month Energy Generation",
"unique": "solis_modbus_inverter_pv_last_month_generation",
"register": ['33033', '33034'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 0,
"register": ['33033', '33034'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 1,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis PV Today Energy Generation",
"unique": "solis_modbus_inverter_pv_today_generation",
Expand All @@ -89,11 +89,11 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis PV This Year Energy Generation",
"unique": "solis_modbus_inverter_pv_this_year_generation",
"register": ['33037', '33038'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 0.1,
"register": ['33037', '33038'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 1,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis PV Last Year Energy Generation",
"unique": "solis_modbus_inverter_pv_last_year_generation",
"register": ['33039', '33040'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 0.1,
"register": ['33039', '33040'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 1,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},
]
},
Expand Down Expand Up @@ -441,7 +441,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis Household Load Month Energy",
"unique": "solis_modbus_inverter_household_month_energy",
"register": ['33584', '33585'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 0,
"register": ['33584', '33585'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 1,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis Household Load Today Energy",
"unique": "solis_modbus_inverter_household_today_energy",
Expand All @@ -459,7 +459,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry, asyn
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis Backup Load Month Energy",
"unique": "solis_modbus_inverter_backup_month_energy",
"register": ['33594', '33595'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 0,
"register": ['33594', '33595'], "device_class": SensorDeviceClass.ENERGY, "multiplier": 1,
"unit_of_measurement": UnitOfEnergy.KILO_WATT_HOUR, "state_class": SensorStateClass.TOTAL_INCREASING},
{"type": "SS", "name": "Solis Backup Load Today Energy",
"unique": "solis_modbus_inverter_backup_today_energy",
Expand Down

0 comments on commit feb6522

Please sign in to comment.