{%- assign components = site.components | sort_natural: 'title' -%} {%- assign github_main_repo = 'https://github.com/home-assistant/home-assistant/blob/dev/homeassistant' -%}
{%- include edit_github.html -%}
{%- if page.logo -%} {%- endif -%}
{%- assign file_parts = page.url | split: '/' | last | split: '.' -%} {%- if file_parts.size == 2 -%} {%- assign is_platform = true -%} {%- assign imp_name = file_parts[1] -%} {%- assign imp_url = imp_name | prepend: '/components/' | append: '/' -%} {%- assign parent_name = file_parts[0] -%} {%- assign parent_url = parent_name | prepend: '/components/' | append: '/' -%} {%- assign parent_component = components | where: 'url', imp_url | first -%} {%- else -%} {%- assign is_platform = false -%} {%- assign imp_name = file_parts | first -%} {%- assign imp_url = imp_name | prepend: '/components/' | append: '/' -%} {%- endif -%} {%- if page.ha_iot_class -%}
IoT class: {{ page.ha_iot_class }}
{%- endif -%} {%- if page.ha_qa_scale -%}
Quality Scale: {%- if page.ha_qa_scale == 'platinum' -%} 🏆 (platinum) {%- elsif page.ha_qa_scale == 'gold' -%} 🥇 (gold) {%- elsif page.ha_qa_scale == 'silver' -%} 🥈 (silver) {%- elsif page.ha_qa_scale == 'internal' -%} 🏠 (internal) {%- endif -%}
{%- endif -%} {%- if page.ha_release -%}
Introduced in release: {{ page.ha_release }}
{%- endif -%} {%- if page.ha_config_flow -%}
This component is configurable via UI
{%- endif -%}
{%- if is_platform -%} Source: {{imp_name}}/{{parent_name}}.py {%- else -%} Source: {{imp_url}} {%- endif -%}
{%- if is_platform and parent_name != 'sensor' -%}
This is a platform for the {{parent_component.title}} component.
{%- elsif is_platform == false and imp_name != 'ifttt' -%} {%- assign platforms_found = false -%} {%- for component in components -%} {%- if component.url != page.url -%} {%- assign comp_imp_name = component.url | split: '/' | last | split: '.' | first -%} {%- if comp_imp_name == imp_name %} {%- unless platforms_found -%} {%- assign platforms_found = true -%}

Platforms

{%- endif -%} {%- endif -%} {%- assign related_found = false -%} {%- for component in components -%} {%- if component.url != page.url -%} {%- assign comp_file_parts = component.url | split: '/' | last | split: '.' -%} {%- if comp_file_parts.size == 2 -%} {%- assign comp_imp_name = comp_file_parts | last -%} {%- else -%} {%- assign comp_imp_name = comp_file_parts | first -%} {%- endif -%} {%- if comp_imp_name == imp_name -%} {%- unless related_found -%} {%- assign related_found = true -%}

Related components

{%- endif -%} {%- if page.ha_category.first -%}

Categories

{%- endif -%}