Skip to content

Commit

Permalink
smartmeter: don't create empty items file
Browse files Browse the repository at this point in the history
  • Loading branch information
Morg42 committed Dec 17, 2024
1 parent f6905c1 commit 40517bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions smartmeter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ def create_items(self, data: dict = {}, file: str = '') -> bool:
"""
if not data:
data = self.obis_results
if not data:
return False

try:
id = data['1-0:96.1.0*255'][0]['value']
Expand Down

0 comments on commit 40517bd

Please sign in to comment.