From 7b230e2a622969a18cfcd948e773de10c7caccad Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 2 Nov 2022 22:18:07 +0100 Subject: [PATCH] Update my links for iot standards (#24794) --- plugins/my.rb | 3 ++- .../asides/component_navigation.html | 20 +++++++++++++++---- source/_integrations/leviton_z_wave.markdown | 6 ++---- source/_integrations/third_reality.markdown | 2 +- source/_integrations/ultraloq.markdown | 2 +- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/plugins/my.rb b/plugins/my.rb index 20fba206a0f..0a2ab949c07 100644 --- a/plugins/my.rb +++ b/plugins/my.rb @@ -16,7 +16,7 @@ module Jekyll #{args} Valid syntax: - {% my [title="Link name"] [badge] [icon[="icon-puzzle-piece"]] [addon="core_ssh"] [blueprint_url="http://example.com/blueprint.yaml"] [domain="hue"] [service="light.turn_on"] %} + {% my [title="Link name"] [badge] [icon[="icon-puzzle-piece"]] [addon="core_ssh"] [blueprint_url="http://example.com/blueprint.yaml"] [domain="hue"] [brand="philips"] [service="light.turn_on"] %} MSG end end @@ -33,6 +33,7 @@ module Jekyll query += [["addon", options[:addon]]] if options.include? :addon query += [["blueprint_url", options[:blueprint_url]]] if options.include? :blueprint_url query += [["domain", options[:domain]]] if options.include? :domain + query += [["brand", options[:brand]]] if options.include? :brand query += [["repository_url", options[:repository_url]]] if options.include? :repository_url query += [["service", options[:service]]] if options.include? :service unless query.empty? diff --git a/source/_includes/asides/component_navigation.html b/source/_includes/asides/component_navigation.html index 165493b98a5..fcdf3f5da32 100644 --- a/source/_includes/asides/component_navigation.html +++ b/source/_includes/asides/component_navigation.html @@ -12,17 +12,29 @@ {%- if page.ha_config_flow and domain -%} {% my config_flow_start badge domain=domain %} {%- elsif page.ha_iot_standard == "zigbee" -%} - {% my config_zha badge %} + {%- if page.ha_brand -%} + {% my add_zigbee_device badge brand=domain %} + {%- elsif domain -%} + {% my add_zigbee_device badge domain=domain %} + {%- else -%} + {% my add_zigbee_device badge %} + {%- endif -%} {%- elsif page.ha_iot_standard == "zwave" -%} - {% my config_zwave_js badge %} + {%- if page.ha_brand -%} + {% my add_zwave_device badge brand=domain %} + {%- elsif domain -%} + {% my add_zwave_device badge domain=domain %} + {%- else -%} + {% my add_zwave_device badge %} + {%- endif -%} {%- endif -%}
{%- if page.ha_brand -%} - The {{ page.name | default: page.title }} brand was introduced in Home Assistant {{ page.ha_release | default: "unknown" }}. + The {{ page.title | default: page.name }} brand was introduced in Home Assistant {{ page.ha_release | default: "unknown" }}. {%- else -%} - The {{ page.name | default: page.title }} {{ page.ha_integration_type | default: "integration" }} was introduced in Home Assistant {{ page.ha_release | default: "unknown" }}, + The {{ page.title | default: page.name }} {{ page.ha_integration_type | default: "integration" }} was introduced in Home Assistant {{ page.ha_release | default: "unknown" }}, and it's used by {% if percentage < 1 %} diff --git a/source/_integrations/leviton_z_wave.markdown b/source/_integrations/leviton_z_wave.markdown index 94d1ffd7694..9089eae67a7 100644 --- a/source/_integrations/leviton_z_wave.markdown +++ b/source/_integrations/leviton_z_wave.markdown @@ -4,7 +4,6 @@ description: Connect and control your Leviton Z-Wave devices using the Z-Wave in featured: true ha_release: '2021.2' ha_iot_class: Local Push -ha_config_flow: true ha_codeowners: - '@home-assistant/z-wave' ha_category: @@ -43,15 +42,14 @@ ha_platforms: - siren - switch - update -ha_supporting_domain: zwave_js -ha_supporting_integration: Z-Wave +ha_iot_standard: zwave --- [Leviton](https://leviton.com) is a member of the Works with Home Assistant partner program for their Z-Wave products. Leviton is committed to making sure their products are up-to-date and ready to use in Home Assistant. [Leviton Z-Wave products](https://www.amazon.com/Leviton) make it easy to automate your lighting using any of their products including the DZ6HD dimmer, DZ15S switch, ZW4SF Fan Speed Controller, DZPD3 Plug-in Dimmer, DZPA1 Plug-in Switch, and ZW15R Outlet. Leviton Z-Wave devices work locally and integrate seamlessly with the Z-Wave integration in Home Assistant (Z-Wave stick required). As all connectivity is happening locally, status updates and controlling your devices happen instantly in Home Assistant. Each device that is connected to power will also act as a Z-Wave router to extend your Z-Wave mesh network. -{% include integrations/config_flow.md domain=page.ha_supporting_domain %} +{% my add_zwave_device badge domain=page.ha_domain %}

To find more information, please use the [Z-Wave integration](/integrations/zwave_js) page. diff --git a/source/_integrations/third_reality.markdown b/source/_integrations/third_reality.markdown index db5a31be324..8e890369d6d 100644 --- a/source/_integrations/third_reality.markdown +++ b/source/_integrations/third_reality.markdown @@ -29,6 +29,6 @@ Third Reality Zigbee devices work locally and integrate seamlessly with the Zigb To add Third Reality products, pair them as Zigbee devices: -{% my config_zha badge %} +{% my add_zigbee_device badge brand=page.ha_domain %} [Learn more about Zigbee in Home Assistant.](/integrations/zha/) diff --git a/source/_integrations/ultraloq.markdown b/source/_integrations/ultraloq.markdown index 9c614db2bc0..352fcc6c5ee 100644 --- a/source/_integrations/ultraloq.markdown +++ b/source/_integrations/ultraloq.markdown @@ -20,6 +20,6 @@ Ultraloq Z-Wave Series smart locks work locally and integrate seamlessly with th To add Ultraloq Z-Wave products, pair them as Z-Wave devices: -{% my config_zwave_js badge %} +{% my add_zwave_device badge domain=page.ha_domain %} [Learn more about Z-Wave in Home Assistant.](/integrations/zwave_js/)