Skip to content

Commit

Permalink
cleanup the device seperation obsolete code
Browse files Browse the repository at this point in the history
removes old testing code that is obsolete now that there is another way of seperating unit id 0 and 100 devices
  • Loading branch information
sfstar committed May 19, 2024
1 parent db245cd commit 10ffb1e
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 36 deletions.
6 changes: 0 additions & 6 deletions custom_components/victron/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ async def async_setup_entry(
for register_name, registerInfo in register_info_dict[name].items():
_LOGGER.debug("unit == " + str(slave) + " registerLedger == " + str(registerLedger) + " registerInfo ")

#VE.CAN device zero is present under unit 100. This seperates non system / settings entities into the seperate can device
# if slave == 100 and not register_name.startswith(("settings", "system")) :
# actual_id = 0
# else:
# actual_id = slave

if isinstance(registerInfo.entityType, BoolReadEntityType):
description = VictronEntityDescription(
key=register_name,
Expand Down
5 changes: 0 additions & 5 deletions custom_components/victron/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ async def async_setup_entry(
if not config_entry.options[CONF_ADVANCED_OPTIONS]:
continue

# if slave == 100 and not register_name.startswith(("settings", "system")) :
# actual_id = 0
# else:
# actual_id = slave

if isinstance(registerInfo.entityType, ButtonWriteType):
description = VictronEntityDescription(
key=register_name,
Expand Down
3 changes: 0 additions & 3 deletions custom_components/victron/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ def determine_present_devices(self):
#VE.CAN device zero is present under unit 100. This seperates non system / settings entities into the seperate can device
if unit == 100 and not key.startswith(("settings", "system")) :
continue
# actual_id = 0
# else:
# actual_id = unit

try:
address = self.get_first_register_id(register_definition)
Expand Down
5 changes: 0 additions & 5 deletions custom_components/victron/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ async def async_setup_entry(
for register_name, registerInfo in register_info_dict[name].items():
_LOGGER.debug("unit == " + str(slave) + " registerLedger == " + str(registerLedger) + " registerInfo ")

# if slave == 100 and not register_name.startswith(("settings", "system")) :
# actual_id = 0
# else:
# actual_id = slave

if isinstance(registerInfo.entityType, SliderWriteType):
description = VictronEntityDescription(
key=register_name,
Expand Down
5 changes: 0 additions & 5 deletions custom_components/victron/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ async def async_setup_entry(
for register_name, registerInfo in register_info_dict[name].items():
if isinstance(registerInfo.entityType, SelectWriteType):
_LOGGER.debug("unit == " + str(slave) + " registerLedger == " + str(registerLedger) + " registerInfo ")

# if slave == 100 and not register_name.startswith(("settings", "system")) :
# actual_id = 0
# else:
# actual_id = slave

description = VictronEntityDescription(
key=register_name,
Expand Down
6 changes: 0 additions & 6 deletions custom_components/victron/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ async def async_setup_entry(
if config_entry.options[CONF_ADVANCED_OPTIONS]:
if not isinstance(registerInfo.entityType, ReadEntityType) or isinstance(registerInfo.entityType, BoolReadEntityType):
continue

#VE.CAN device zero is present under unit 100. This seperates non system / settings entities into the seperate can device
# if slave == 100 and not register_name.startswith(("settings", "system")) :
# actual_id = 0
# else:
# actual_id = slave

description = VictronEntityDescription(
key=register_name,
Expand Down
6 changes: 0 additions & 6 deletions custom_components/victron/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ async def async_setup_entry(
for register_name, registerInfo in register_info_dict[name].items():
_LOGGER.debug("unit == " + str(slave) + " registerLedger == " + str(registerLedger) + " registerInfo ")

#VE.CAN device zero is present under unit 100. This seperates non system / settings entities into the seperate can device
# if slave == 100 and not register_name.startswith(("settings", "system")) :
# actual_id = 0
# else:
# actual_id = slave

if isinstance(registerInfo.entityType, SwitchWriteType):
description = VictronEntityDescription(
key=register_name,
Expand Down

0 comments on commit 10ffb1e

Please sign in to comment.