Skip to content

Commit

Permalink
#19 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yozik04 committed Feb 15, 2023
1 parent 5af06ef commit a4003e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nibe_mqtt/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ def _get_modbus_connection(self, conn_conf) -> Connection:
)

def _get_device_info(self) -> dict:
if "nibegw" in conf["nibe"]:
address = conf["nibe"]["nibegw"]["ip"]
elif "modbus" in conf["nibe"]:
address = conf["nibe"]["modbus"]["url"] + f"-{conf['nibe']['modbus']['slave_id']}"
if "nibegw" in self.conf["nibe"]:
address = self.conf["nibe"]["nibegw"]["ip"]
elif "modbus" in self.conf["nibe"]:
address = self.conf["nibe"]["modbus"]["url"] + f"-{self.conf['nibe']['modbus']['slave_id']}"
else:
raise AssertionError("Connection type not supported")

Expand Down

0 comments on commit a4003e8

Please sign in to comment.