From 1a74709757959ee7708d38a57a7b7061e16d3bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Thu, 4 Feb 2021 13:31:17 +0100 Subject: [PATCH] Throw error in hassfest when integration is missing version (#45976) --- script/hassfest/manifest.py | 2 +- tests/hassfest/test_version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/script/hassfest/manifest.py b/script/hassfest/manifest.py index 583cafc8161..c6f8f71f2d9 100644 --- a/script/hassfest/manifest.py +++ b/script/hassfest/manifest.py @@ -119,7 +119,7 @@ def validate_version(integration: Integration): Will be removed when the version key is no longer optional for custom integrations. """ if not integration.manifest.get("version"): - integration.add_warning( + integration.add_error( "manifest", "No 'version' key in the manifest file. This will cause a future version of Home Assistant to block this integration.", ) diff --git a/tests/hassfest/test_version.py b/tests/hassfest/test_version.py index 203042e79be..f99ee911a69 100644 --- a/tests/hassfest/test_version.py +++ b/tests/hassfest/test_version.py @@ -27,7 +27,7 @@ def test_validate_version_no_key(integration: Integration): validate_version(integration) assert ( "No 'version' key in the manifest file. This will cause a future version of Home Assistant to block this integration." - in [x.error for x in integration.warnings] + in [x.error for x in integration.errors] )