Add P210M(US) 1.0 1.0.3 fixture (#1399)

This commit is contained in:
Steven B. 2024-12-21 09:20:12 +00:00 committed by GitHub
parent cef0e571a0
commit d81cf1b3b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 1594 additions and 5 deletions

View File

@ -197,7 +197,7 @@ The following devices have been tested and confirmed as working. If your device
### Supported Tapo[^1] devices ### Supported Tapo[^1] devices
- **Plugs**: P100, P110, P110M, P115, P125M, P135, TP15 - **Plugs**: P100, P110, P110M, P115, P125M, P135, TP15
- **Power Strips**: P300, P304M, TP25 - **Power Strips**: P210M, P300, P304M, TP25
- **Wall Switches**: S500D, S505, S505D - **Wall Switches**: S500D, S505, S505D
- **Bulbs**: L510B, L510E, L530E, L630 - **Bulbs**: L510B, L510E, L530E, L630
- **Light Strips**: L900-10, L900-5, L920-5, L930-5 - **Light Strips**: L900-10, L900-5, L920-5, L930-5

View File

@ -208,6 +208,8 @@ All Tapo devices require authentication.<br>Hub-Connected Devices may work acros
### Power Strips ### Power Strips
- **P210M**
- Hardware: 1.0 (US) / Firmware: 1.0.3
- **P300** - **P300**
- Hardware: 1.0 (EU) / Firmware: 1.0.13 - Hardware: 1.0 (EU) / Firmware: 1.0.13
- Hardware: 1.0 (EU) / Firmware: 1.0.15 - Hardware: 1.0 (EU) / Firmware: 1.0.15

View File

@ -111,7 +111,7 @@ SWITCHES_SMART = {
"S505D", "S505D",
} }
SWITCHES = {*SWITCHES_IOT, *SWITCHES_SMART} SWITCHES = {*SWITCHES_IOT, *SWITCHES_SMART}
STRIPS_IOT = {"HS107", "HS300", "KP303", "KP200", "KP400", "EP40"} STRIPS_IOT = {"HS107", "HS300", "KP303", "KP200", "KP400", "EP40", "P210M"}
STRIPS_SMART = {"P300", "P304M", "TP25", "EP40M"} STRIPS_SMART = {"P300", "P304M", "TP25", "EP40M"}
STRIPS = {*STRIPS_IOT, *STRIPS_SMART} STRIPS = {*STRIPS_IOT, *STRIPS_SMART}

File diff suppressed because it is too large Load Diff

View File

@ -268,7 +268,8 @@ async def test_alias(dev, runner):
res = await runner.invoke(alias, obj=dev) res = await runner.invoke(alias, obj=dev)
assert f"Alias: {new_alias}" in res.output assert f"Alias: {new_alias}" in res.output
await dev.set_alias(old_alias) # If alias is None set it back to empty string
await dev.set_alias(old_alias or "")
async def test_raw_command(dev, mocker, runner): async def test_raw_command(dev, mocker, runner):

View File

@ -65,12 +65,13 @@ async def test_alias(dev):
test_alias = "TEST1234" test_alias = "TEST1234"
original = dev.alias original = dev.alias
assert isinstance(original, str) assert isinstance(original, str | None)
await dev.set_alias(test_alias) await dev.set_alias(test_alias)
await dev.update() await dev.update()
assert dev.alias == test_alias assert dev.alias == test_alias
await dev.set_alias(original) # If alias is None set it back to empty string
await dev.set_alias(original or "")
await dev.update() await dev.update()
assert dev.alias == original assert dev.alias == original