Skip to content

Request: improove integration for other devices. #2

@bennydente

Description

@bennydente

Hi,

i'm not realy a developer but your integration work fine with my USR-WP1 smart plug, USR-WM1H and USR-WM1S 1 channel switch.
I have modified code like this in switch.py discoverying jut one entity:

before:

 def devices_from_entities(hass, entry):
     """Parse configuration and add USR-R16 switch devices."""
     device_client = hass.data[DOMAIN][entry.entry_id][DATA_DEVICE_REGISTER]
     devices = []
     for i in range(1,17):
           device_port = i
           device = R16Switch(device_port, entry.entry_id, device_client)
           devices.append(device)
     return devices

after:

  def devices_from_entities(hass, entry):
      """Parse configuration and add USR-R16 switch devices."""
      device_client = hass.data[DOMAIN][entry.entry_id][DATA_DEVICE_REGISTER]
      devices = []
      device_port = 1
      device = R16Switch(device_port, entry.entry_id, device_client)
      devices.append(device)
      return devices

So if you want to improove integration.... bye.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions