From 0fed178ac8c5e71f9a51e86eaf18ee863c098cc5 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 4 Aug 2021 04:26:14 +0000 Subject: [PATCH] Add badges --- plugins/my.rb | 10 ++++++---- source/_docs/energy.markdown | 2 ++ source/_docs/energy/individual-devices.markdown | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/plugins/my.rb b/plugins/my.rb index 89941e4e762..7ec7cd19ea3 100644 --- a/plugins/my.rb +++ b/plugins/my.rb @@ -20,11 +20,11 @@ module Jekyll MSG end end - + def render(context) # We parse on render, as we now have context options = parse_options(@options, context) - + # Base URI uri = URI.join("https://my.home-assistant.io/redirect/", @redirect) @@ -87,15 +87,17 @@ module Jekyll DEFAULT_TITLES = { "blueprint_import" => "Import Blueprint", "cloud" => "Home Assistant Cloud", + "config_energy" => "Energy Configuration", "config_flow_start" => "Add Integration", "config_mqtt" => "MQTT Configuration", - "config_zha" => "ZHA Configuration", + "config_zha" => "ZHA Configuration", "config_zwave_js" => "Z-Wave JS Configuration", "config" => "Configuration", "developer_events" => "Events", "developer_services" => "Services", "developer_states" => "States", "developer_template" => "Templates", + "energy" => "Energy", "general" => "General Settings", "info" => "Information", "supervisor_info" => "Supervisor Information", @@ -108,7 +110,7 @@ module Jekyll # Split along 3 possible forms: key="value", key=value, or just key input.scan(OPTIONS_REGEX) do |opt| key, value = opt.split("=") - if !value.nil? + if !value.nil? if value&.include?('"') value.delete!('"') else diff --git a/source/_docs/energy.markdown b/source/_docs/energy.markdown index 4158c793b2a..c794713ea27 100644 --- a/source/_docs/energy.markdown +++ b/source/_docs/energy.markdown @@ -5,6 +5,8 @@ description: "How to get started using home energy management in Home Assistant. Home Assistant allows you to get on top of your energy use with its home energy management feature. Gain new insights, optimize your solar panel production, plan energy usage and save money. +{% my energy badge %} {% my config_energy badge %} + Home Assistant works with three different types of information sources. You can start using it even if you just have one source connected to Home Assistant. Every source you add will complement the other sources, giving you even more insight into energy in your home. Home Assistant is an open platform and so home energy management is not restricted to specific hardware. Any energy monitoring hardware that integrates with Home Assistant can be used as a data source. Check out the following sections for in-depth explanations and hardware recommendations. diff --git a/source/_docs/energy/individual-devices.markdown b/source/_docs/energy/individual-devices.markdown index 99f5fcdd43d..c84939cd5e3 100644 --- a/source/_docs/energy/individual-devices.markdown +++ b/source/_docs/energy/individual-devices.markdown @@ -17,10 +17,12 @@ Depending on what protocols you use at home, you can use Zigbee, Z-Wave or Wi-Fi Smart relays sit behind your "normal" switches and make them smart. It allows you to control the devices via Home Assistant and via the connected buttons/switches. +{% comment %} We recommend the Shelly brand because they have a local API that updates Home Assistant as soon as something happens and it has a high quality integration: - - [Shelly 1L](https://shop.shelly.cloud/shelly-1l-wifi-smart-home-automation?tracking=A7FsiPIfUWsFpnfKHa8SRyUYLXjr2hPq) + - [Shelly 1PM](https://shop.shelly.cloud/shelly-1pm-wifi-smart-home-automation-1?tracking=A7FsiPIfUWsFpnfKHa8SRyUYLXjr2hPq) - [Shelly 2.5](https://shop.shelly.cloud/shelly-2.5-ce-ul-wifi-smart-home-automation?tracking=A7FsiPIfUWsFpnfKHa8SRyUYLXjr2hPq) + {% endcomment %} Graphic showing energy flowing from the home to individual devices.