Skip to content

Commit

Permalink
Update sungather.py
Browse files Browse the repository at this point in the history
Revert unneeded changes in main file, keeping those separate to export files.
  • Loading branch information
bohdan-s authored Jul 7, 2022
1 parent cd53342 commit bc8493f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions SunGather/sungather.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def __init__(self, config_inverter):

self.registers = [[]]
self.registers.pop() # Remove null value from list
self.registers_custom = [{'name': 'export_to_grid', 'unit': 'W', 'address': 'vr001'}, {'name': 'import_from_grid', 'unit': 'W', 'address': 'vr002'}, {'name': 'run_state', 'address': 'vr003'}, {'name': 'timestamp', 'address': 'vr004'}]
self.register_ranges = [[]]
self.registers_custom = [{'name': 'export_to_grid', 'unit': 'W'}, {'name': 'import_from_grid', 'unit': 'W'}, {'name': 'run_state'}] self.register_ranges = [[]]
self.register_ranges.pop() # Remove null value from list

self.latest_scrape = {}
Expand Down Expand Up @@ -108,7 +107,7 @@ def configure_registers(self,registersfile):
logging.info(f"Detected Model: {self.inverter_config.get('model')}")
else:
logging.info(f'Model detection failed, please set model in config.py')
self.registers.pop()
self.registers.pop()
break

# Load register list based on name and value after checking model
Expand Down Expand Up @@ -568,4 +567,4 @@ def main():
if __name__== "__main__":
main()

sys.exit()
sys.exit()

0 comments on commit bc8493f

Please sign in to comment.