mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-21 18:36:48 +00:00
142 lines
4.5 KiB
HTML
142 lines
4.5 KiB
HTML
{%- assign components = site.components | sort_natural: 'title' -%}
|
|
{%- assign github_main_repo = 'https://github.com/home-assistant/home-assistant/blob/dev/homeassistant' -%}
|
|
<section class="aside-module grid__item one-whole lap-one-half">
|
|
{%- include edit_github.html -%}
|
|
|
|
<div class='brand-logo-container section'>
|
|
{%- if page.logo -%}
|
|
<img src='/images/supported_brands/{{ page.logo }}' />
|
|
{%- endif -%}
|
|
</div>
|
|
|
|
{%- 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 -%}
|
|
<div class='section'>
|
|
IoT class<sup><a href='/blog/2016/02/12/classifying-the-internet-of-things/#classifiers'><i class="icon-info-sign"></i></a></sup>: {{ page.ha_iot_class }}
|
|
</div>
|
|
{%- endif -%}
|
|
|
|
{%- if page.ha_qa_scale -%}
|
|
<div class='section'>
|
|
Quality Scale: <a href='/docs/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 -%}
|
|
</a>
|
|
</div>
|
|
{%- endif -%}
|
|
|
|
{%- if page.ha_release -%}
|
|
<div class='section'>
|
|
Introduced in release: {{ page.ha_release }}
|
|
</div>
|
|
{%- endif -%}
|
|
|
|
{%- if page.ha_config_flow -%}
|
|
<div class='section'>
|
|
This component is configurable via UI
|
|
</div>
|
|
{%- endif -%}
|
|
|
|
<div class='section'>
|
|
{%- if is_platform -%}
|
|
Source: <a href='{{github_main_repo}}{{imp_url}}{{parent_name}}.py'>{{imp_name}}/{{parent_name}}.py</a>
|
|
{%- else -%}
|
|
Source: <a href='{{github_main_repo}}{{imp_url}}'>{{imp_url}}</a>
|
|
{%- endif -%}
|
|
</div>
|
|
|
|
{%- if is_platform and parent_name != 'sensor' -%}
|
|
<div class='section'>
|
|
This is a platform for
|
|
<a href='{{parent_component.url}}'>the {{parent_component.title}} component</a>.
|
|
</div>
|
|
|
|
{%- 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 -%}
|
|
<h1 class='title delta'>Platforms</h1>
|
|
<ul class='divided'>
|
|
{%- endunless -%}
|
|
<li><a href='{{component.url}}'>
|
|
{{component.title}}
|
|
</a></li>
|
|
{% endif -%}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
|
|
{%- if platforms_found -%}
|
|
</ul>
|
|
{%- 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 -%}
|
|
<div class='section'>
|
|
<h1 class='title delta'>Related components</h1>
|
|
<ul class='divided'>
|
|
{%- endunless -%}
|
|
<li><a href='{{component.url}}'>
|
|
{{component.title}}
|
|
</a></li>
|
|
{%- endif -%}
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
|
|
{%- if related_found -%}
|
|
</ul>
|
|
</div>
|
|
{%- endif -%}
|
|
|
|
{%- if page.ha_category.first -%}
|
|
<div class='section'>
|
|
<h1 class="title delta">Categories</h1>
|
|
<ul class='divided'>
|
|
{%- for category in page.ha_category -%}
|
|
<li>
|
|
<a href='/components/#{{ category | slugify }}'>{{ category }}</a>
|
|
</li>
|
|
{%- endfor -%}
|
|
</ul>
|
|
</div>
|
|
{%- endif -%}
|
|
</section>
|