Skip to content

Commit

Permalink
Merge pull request #211 from sfstar/feature/cleanup_device_seperation…
Browse files Browse the repository at this point in the history
…_obsolete_code

cleanup the device seperation obsolete code
  • Loading branch information
sfstar authored May 19, 2024
2 parents db245cd + 10ffb1e commit 1ec1567
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

1 comment on commit 1ec1567

@angyp
Copy link

@angyp angyp commented on 1ec1567 May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
Ever since this commit I now have two lots of the same settings. One for device ID 0 and the other for ID 100. Is this expected behaviour?
Thanks

Please sign in to comment.