Skip to content

Commit

Permalink
Add model ID to Wemo (home-assistant#125368)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob authored Sep 5, 2024
1 parent 97ffbf5 commit 0677a25
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions homeassistant/components/wemo/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ def _device_info(wemo: WeMoDevice) -> DeviceInfo:
identifiers={(DOMAIN, wemo.serial_number)},
manufacturer="Belkin",
model=wemo.model_name,
model_id=wemo.model,
name=wemo.name,
sw_version=wemo.firmware_version,
)
Expand Down
1 change: 1 addition & 0 deletions tests/components/wemo/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def create_pywemo_device(
device.name = MOCK_NAME
device.serial_number = MOCK_SERIAL_NUMBER
device.model_name = pywemo_model.replace("LongPress", "")
device.model = device.model_name
device.udn = f"uuid:{device.model_name}-1_0-{device.serial_number}"
device.firmware_version = MOCK_FIRMWARE_VERSION
device.get_state.return_value = 0 # Default to Off
Expand Down
1 change: 1 addition & 0 deletions tests/components/wemo/test_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ async def test_device_info(
}
assert device_entries[0].manufacturer == "Belkin"
assert device_entries[0].model == "LightSwitch"
assert device_entries[0].model_id == "LightSwitch"
assert device_entries[0].sw_version == MOCK_FIRMWARE_VERSION


Expand Down
1 change: 1 addition & 0 deletions tests/components/wemo/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def create_device(counter):
device.name = f"{MOCK_NAME}_{counter}"
device.serial_number = f"{MOCK_SERIAL_NUMBER}_{counter}"
device.model_name = "Motion"
device.model = "Motion"
device.udn = f"uuid:{device.model_name}-1_0-{device.serial_number}"
device.firmware_version = MOCK_FIRMWARE_VERSION
device.get_state.return_value = 0 # Default to Off
Expand Down

0 comments on commit 0677a25

Please sign in to comment.