Skip to content

Commit

Permalink
fix name roundtrip
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 committed Oct 9, 2023
1 parent 2bc2a7d commit 06413e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 1 addition & 3 deletions ika/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,7 @@ class VacuumProtocol:
READ_SOFTWARE_VERSION = "IN_VERSION"
# Read the release date of the display/ logic firmware: 'IN_DATE'
READ_DEVICE_NAME = "IN_NAME"
# Read custom device name: "IN_CUSTOM_DEVICE_NAME"
# unsure of difference between IN_NAME and IN_CUSTOM_DEVICE_NAME
SET_DEVICE_NAME = "OUT_CUSTOM_DEVICE_NAME "
SET_DEVICE_NAME = "OUT_NAME " # manual incorrectly refers to CUSTOM_DEVICE_NAME
# Read the device type.: 'IN_DEVICE'
# Read mac address of Wico.: 'IN_ADDRESS'
# Read paired mac address of station.: 'IN_PARING' (sic)
Expand Down
9 changes: 5 additions & 4 deletions tests/test_vacuum_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,14 @@ async def get():
await get()


async def test_custom_name_roundtrip():
"""Confirm that the custom name can be updated."""
async def test_name_roundtrip():
"""Confirm that the device name can be updated."""
async def get():
async with Vacuum(ADDRESS) as device:
await device.set_name('THIS SUCKS')
name = (await device.get_info())['name']
assert name == 'THIS SUCKS'
await device.set_name('SUCK MORE')
await device.set_name('VACSTAR control')
name = (await device.get_info())['name']
assert name == 'SUCK MORE'
assert name == 'VACSTAR control'
await get()

0 comments on commit 06413e2

Please sign in to comment.