mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Add logo & icon support to Manifest (#31131)
* Add logo & icon support to Manifest * Add URL validation
This commit is contained in:
committed by
Paulus Schoutsen
parent
9795449d22
commit
c0bc4bb550
@@ -244,6 +244,16 @@ class Integration:
|
||||
"""Return Integration Quality Scale."""
|
||||
return cast(str, self.manifest.get("quality_scale"))
|
||||
|
||||
@property
|
||||
def logo(self) -> Optional[str]:
|
||||
"""Return Integration Logo."""
|
||||
return cast(str, self.manifest.get("logo"))
|
||||
|
||||
@property
|
||||
def icon(self) -> Optional[str]:
|
||||
"""Return Integration Icon."""
|
||||
return cast(str, self.manifest.get("icon"))
|
||||
|
||||
@property
|
||||
def is_built_in(self) -> bool:
|
||||
"""Test if package is a built-in integration."""
|
||||
|
@@ -29,6 +29,8 @@ MANIFEST_SCHEMA = vol.Schema(
|
||||
vol.Required("dependencies"): [str],
|
||||
vol.Optional("after_dependencies"): [str],
|
||||
vol.Required("codeowners"): [str],
|
||||
vol.Optional("logo"): vol.Url(), # pylint: disable=no-value-for-parameter
|
||||
vol.Optional("icon"): vol.Url(), # pylint: disable=no-value-for-parameter
|
||||
}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user