Use string type for amazon devices OTP code (#145698)

This commit is contained in:
Joost Lekkerkerker 2025-05-27 12:33:02 +02:00 committed by GitHub
parent 8364d8a2e3
commit 2189dc3e2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View File

@ -57,7 +57,7 @@ class AmazonDevicesConfigFlow(ConfigFlow, domain=DOMAIN):
): CountrySelector(),
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_CODE): cv.positive_int,
vol.Required(CONF_CODE): cv.string,
}
),
)

View File

@ -1,6 +1,6 @@
"""Amazon Devices tests const."""
TEST_CODE = 123123
TEST_CODE = "023123"
TEST_COUNTRY = "IT"
TEST_PASSWORD = "fake_password"
TEST_SERIAL_NUMBER = "echo_test_serial_number"

View File

@ -56,6 +56,7 @@ async def test_full_flow(
},
}
assert result["result"].unique_id == TEST_USERNAME
mock_amazon_devices_client.login_mode_interactive.assert_called_once_with("023123")
@pytest.mark.parametrize(