mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 20:36:52 +00:00
Refactor of documentation method for components (2019-0016) (#8265)
* 🚜 Refactor of documentation method for components * 👕 Marks Ikea Tradfri ha_config_flow * 👕 Fixes additionalwhitespace generation
This commit is contained in:
parent
3f8a200f0f
commit
92fb95d4ca
@ -411,6 +411,8 @@ p.note {
|
|||||||
.brand-logo-container {
|
.brand-logo-container {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 87px;
|
height: 87px;
|
||||||
|
margin-top: 50px;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
max-height: 67px;
|
max-height: 67px;
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
layout: page
|
|
||||||
title: "IKEA Trådfri lights"
|
|
||||||
description: "Access and control your Zigbee-based IKEA Trådfri (Tradfri) Lights."
|
|
||||||
date: 2017-04-12 22.04
|
|
||||||
sidebar: true
|
|
||||||
comments: false
|
|
||||||
sharing: true
|
|
||||||
footer: true
|
|
||||||
logo: ikea.svg
|
|
||||||
ha_category: Light
|
|
||||||
ha_iot_class: "Local Polling"
|
|
||||||
ha_release: 0.43
|
|
||||||
---
|
|
||||||
|
|
||||||
For installation instructions, see [the Trådfri component](/components/tradfri/).
|
|
@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
layout: page
|
|
||||||
title: "IKEA Trådfri Sensor"
|
|
||||||
description: "Access and control your Zigbee-based IKEA Trådfri (Tradfri) Sensors."
|
|
||||||
date: 2017-04-12 22.04
|
|
||||||
sidebar: true
|
|
||||||
comments: false
|
|
||||||
sharing: true
|
|
||||||
footer: true
|
|
||||||
logo: ikea.svg
|
|
||||||
ha_category: Sensor
|
|
||||||
ha_iot_class: "Local Polling"
|
|
||||||
ha_release: 0.67
|
|
||||||
---
|
|
||||||
|
|
||||||
For installation instructions, see [the Trådfri component](/components/tradfri/).
|
|
@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
layout: page
|
|
||||||
title: "IKEA Trådfri Switch"
|
|
||||||
description: "Access and control your Zigbee-based IKEA Trådfri (Tradfri) Switches."
|
|
||||||
date: 2018-09-30 19.22
|
|
||||||
sidebar: true
|
|
||||||
comments: false
|
|
||||||
sharing: true
|
|
||||||
footer: true
|
|
||||||
logo: ikea.svg
|
|
||||||
ha_category: Switch
|
|
||||||
ha_iot_class: "Local Polling"
|
|
||||||
ha_release: 0.80
|
|
||||||
---
|
|
||||||
|
|
||||||
For installation instructions, see [the Trådfri component](/components/tradfri/).
|
|
@ -9,9 +9,17 @@ comments: false
|
|||||||
sharing: true
|
sharing: true
|
||||||
footer: true
|
footer: true
|
||||||
logo: ikea.svg
|
logo: ikea.svg
|
||||||
ha_category: Hub
|
|
||||||
ha_iot_class: "Local Polling"
|
ha_iot_class: "Local Polling"
|
||||||
|
ha_config_flow: true
|
||||||
ha_release: 0.43
|
ha_release: 0.43
|
||||||
|
ha_category:
|
||||||
|
- Light
|
||||||
|
- Sensor
|
||||||
|
- Switch
|
||||||
|
redirect_from:
|
||||||
|
- /components/light.tradfri/
|
||||||
|
- /components/sensor.tradfri/
|
||||||
|
- /components/switch.tradfri/
|
||||||
---
|
---
|
||||||
|
|
||||||
The `tradfri` component support the IKEA Trådfri Gateway (a.k.a. IKEA Tradfri hub/bridge). The gateway can control compatible Zigbee-based lights (certified ZigBee Light Link products) connected to it and Home Assistant will automatically discover the gateways presence on your local network, if `discovery:` is present in your `configuration.yaml` file.
|
The `tradfri` component support the IKEA Trådfri Gateway (a.k.a. IKEA Tradfri hub/bridge). The gateway can control compatible Zigbee-based lights (certified ZigBee Light Link products) connected to it and Home Assistant will automatically discover the gateways presence on your local network, if `discovery:` is present in your `configuration.yaml` file.
|
||||||
|
@ -50,6 +50,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
{%- if page.ha_config_flow -%}
|
||||||
|
<div class='section'>
|
||||||
|
This component is configurable via UI
|
||||||
|
</div>
|
||||||
|
{%- endif -%}
|
||||||
|
|
||||||
{%- if is_platform -%}
|
{%- if is_platform -%}
|
||||||
<div class='section'>
|
<div class='section'>
|
||||||
Source:
|
Source:
|
||||||
@ -88,7 +94,6 @@
|
|||||||
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
|
||||||
{%- assign related_found = false -%}
|
{%- assign related_found = false -%}
|
||||||
{%- for component in components -%}
|
{%- for component in components -%}
|
||||||
{%- if component.url != page.url -%}
|
{%- if component.url != page.url -%}
|
||||||
@ -118,22 +123,14 @@
|
|||||||
</div>
|
</div>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
{%- if page.ha_category.first -%}
|
||||||
|
|
||||||
{%- if page.ha_category -%}
|
|
||||||
<div class='section'>
|
<div class='section'>
|
||||||
<h1 class="title delta">Category {{page.ha_category}}</h1>
|
<h1 class="title delta">Categories</h1>
|
||||||
<ul class='divided'>
|
<ul class='divided'>
|
||||||
{%- for component in components -%}
|
{%- for category in page.ha_category -%}
|
||||||
{%- if component.ha_category == page.ha_category -%}
|
|
||||||
<li>
|
<li>
|
||||||
{%- if component.url == page.url -%}
|
<a href='/components/#{{ category | slugify }}'>{{ category }}</a>
|
||||||
{{component.title}}
|
|
||||||
{%- else -%}
|
|
||||||
<a href='{{component.url}}'>{{component.title}}</a>
|
|
||||||
{%- endif -%}
|
|
||||||
</li>
|
</li>
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,12 +17,16 @@ regenerate: false
|
|||||||
{%- assign tot = 0 -%}
|
{%- assign tot = 0 -%}
|
||||||
{%- for comp in site.components -%}
|
{%- for comp in site.components -%}
|
||||||
{%- if comp.ha_category -%}
|
{%- if comp.ha_category -%}
|
||||||
|
{%- if comp.ha_category.first -%}
|
||||||
|
{%- assign tot = tot | plus: comp.ha_category.size -%}
|
||||||
|
{%- else -%}
|
||||||
{%- assign tot = tot | plus: 1 -%}
|
{%- assign tot = tot | plus: 1 -%}
|
||||||
|
{%- endif -%}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
||||||
{%- assign components = site.components | sort: 'title' -%}
|
{%- assign components = site.components | sort: 'title' -%}
|
||||||
{%- assign categories = components | sort: 'ha_category' | map: 'ha_category' | uniq -%}
|
{%- assign categories = components | map: 'ha_category' | join: ',' | join: ',' | split: ',' | uniq | sort -%}
|
||||||
{%- capture current_version -%}{{ site.current_major_version }}.{{ site.current_minor_version }}{% endcapture -%}
|
{%- capture current_version -%}{{ site.current_major_version }}.{{ site.current_minor_version }}{% endcapture -%}
|
||||||
{%- assign added_one_ago_minor_version = site.current_minor_version|minus: 1 -%}
|
{%- assign added_one_ago_minor_version = site.current_minor_version|minus: 1 -%}
|
||||||
{%- capture added_one_ago_version -%}{{ site.current_major_version }}.{{ added_one_ago_minor_version }}{% endcapture -%}
|
{%- capture added_one_ago_version -%}{{ site.current_major_version }}.{{ added_one_ago_minor_version }}{% endcapture -%}
|
||||||
@ -51,7 +55,7 @@ Support for these components is provided by the Home Assistant community.
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
||||||
<a href='#other' class="btn">Other</a>
|
<a href='#other' class="btn">Other ({{ components | where: 'ha_category', 'Other' | size }})</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid__item five-sixths lap-one-whole palm-one-whole">
|
<div class="grid__item five-sixths lap-one-whole palm-one-whole">
|
||||||
@ -100,7 +104,11 @@ var allComponents = [
|
|||||||
{%- assign sliced_version = component.ha_release | split: '.' -%}
|
{%- assign sliced_version = component.ha_release | split: '.' -%}
|
||||||
{%- assign minor_version = sliced_version[1]|plus: 0 -%}
|
{%- assign minor_version = sliced_version[1]|plus: 0 -%}
|
||||||
{%- assign major_version = sliced_version[0]|plus: 0 -%}
|
{%- assign major_version = sliced_version[0]|plus: 0 -%}
|
||||||
{url:"{{ component.url }}", title:"{{component.title}}", cat:"{{component.ha_category | slugify}}", featured: {% if component.featured %}true{% else %}false{% endif %}, v: "{{major_version}}.{{minor_version}}", logo: "{{component.logo}}"},
|
{%- assign featured_first = true -%}
|
||||||
|
{%- for ha_category in component.ha_category -%}
|
||||||
|
{url:"{{ component.url }}", title:"{{component.title}}", cat:"{{ha_category | slugify}}", featured: {% if component.featured and featured_first %}true{% else %}false{% endif %}, v: "{{major_version}}.{{minor_version}}", logo: "{{component.logo}}"},
|
||||||
|
{%- assign featured_first = false -%}
|
||||||
|
{%- endfor -%}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
false
|
false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user