From c2d567b80e51767d7c2b25aee4ef1d38173c13b9 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Wed, 27 Oct 2021 13:49:55 +0200 Subject: [PATCH 1/3] Refactor the SPI and ums info for the ODROID-N2+ (#20007) --- .../_includes/common-tasks/flashing_n2_otg.md | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/source/_includes/common-tasks/flashing_n2_otg.md b/source/_includes/common-tasks/flashing_n2_otg.md index 380f7de6d14..3cf25919146 100644 --- a/source/_includes/common-tasks/flashing_n2_otg.md +++ b/source/_includes/common-tasks/flashing_n2_otg.md @@ -14,34 +14,41 @@ To flash your eMMC using Petitboot and OTG-USB, you will need the following item #### Enabling SPI boot mode -Remove the case of your ODROID-N2+ +To enable the SPI boot mode: -![Photo of the removed case](/images/hassio/screenshots/case-removed.jpg) +1. Power off the ODROID-N2+ by unplugging the power cable. +1. Remove the case. -Next, locate the toggle for boot mode and switch it from MMC to SPI. + ![Photo of the removed case](/images/hassio/screenshots/case-removed.jpg) -![Photo of the SPI toggle switch](/images/hassio/screenshots/toggle_spi.jpg) +1. Locate the toggle for boot mode and switch it from MMC to SPI. -Connect a USB keyboard and HDMI connected monitor to your ODROID-N2+, and then connect power. + ![Photo of the SPI toggle switch](/images/hassio/screenshots/toggle_spi.jpg) + +1. Connect the ODROID-N2+ directly to your computer via the USB-OTG port located on the front of the board. +1. Connect a USB keyboard and a monitor (using HDMI) to your ODROID-N2+. +1. Plug in the power cable to power on the ODROID-N2+. #### Enabling USB drive mode -The ODROID-N2+ will now boot into a terminal. Select `Exit to shell` from the menu. +After The ODROID-N2+ is set to SPI boot mode and powered on, it boots into a terminal. To enable the USB drive mode: -![Exit to shell](/images/hassio/screenshots/exit-shell.png) +1. Select `Exit to shell` from the menu. -Use the following command at the console to confirm the storage device node: + ![Exit to shell](/images/hassio/screenshots/exit-shell.png) -```bash -ls /dev/mmc* -``` +1. Use the following command at the console to confirm the storage device node: -Set the storage device on the ODROID-N2+ as a mass storage device using `ums` (USB Mass storage mode) -This will configure the ODROID-N2+ and OTG to act as a memory card reader. + ```bash + ls /dev/mmc* + ``` -```bash -ums /dev/mmcblk0 -``` +1. Set the storage device on the ODROID-N2+ as a mass storage device using the `ums` command (USB Mass storage mode). +This will configure the ODROID-N2+ and OTG to act as a memory card reader: + + ```bash + ums /dev/mmcblk0 + ``` #### Flashing Home Assistant @@ -51,4 +58,4 @@ When the flash process is complete, disconnect the ODROID-N2+ from your PC and r Once it is back in its case, connect your ODROID-N2+ to your network with an Ethernet cable and plug in power. -If your router supports mDNS, you will be able to reach your installation on `http://homeassistant.local:8123`. If your network doesn’t support mDNS, you’ll have to use the IP address of your ODROID-N2+ instead of `homeassistant.local`. For example, `http://192.168.0.9:8123`. You should be able to find the IP address of your ODROID-N2+ from the admin interface of your router. \ No newline at end of file +If your router supports mDNS, you will be able to reach your installation on `http://homeassistant.local:8123`. If your network doesn’t support mDNS, you’ll have to use the IP address of your ODROID-N2+ instead of `homeassistant.local`. For example, `http://192.168.0.9:8123`. You should be able to find the IP address of your ODROID-N2+ from the admin interface of your router. From df52f0eb3cda1ed8578ccc656b6b2778e1cdc3f1 Mon Sep 17 00:00:00 2001 From: SNoof85 Date: Wed, 27 Oct 2021 14:01:14 +0200 Subject: [PATCH 2/3] edimax update template sensor example (#19970) --- source/_integrations/edimax.markdown | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/source/_integrations/edimax.markdown b/source/_integrations/edimax.markdown index 8145f84139d..f99fde9bfe1 100644 --- a/source/_integrations/edimax.markdown +++ b/source/_integrations/edimax.markdown @@ -50,17 +50,15 @@ Starting with [version 2 of the firmware](https://www.edimax.com/edimax/download {% raw %} ```yaml - - platform: template - sensors: - edimax_current_power: - friendly_name: Edimax Current power consumption - unit_of_measurement: "W" - value_template: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | replace('None', 0) }}" - - edimax_total_power: - friendly_name: Edimax Accumulated daily power consumption - unit_of_measurement: "kWh" - value_template: "{{ state_attr('switch.edimax_smart_plug', 'today_energy_kwh') | replace('None', 0) }}" +template: + - sensor: + - name: Edimax Current power consumption + unit_of_measurement: "W" + state: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | default(0, true) }}" + + - name: Edimax Accumulated daily power consumption + unit_of_measurement: "kWh" + state: "{{ state_attr('switch.edimax_smart_plug', 'current_power_w') | default(0, true) }}" ``` {% endraw %} From cf40e424e4966f864b8aab052c11b6efae574188 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 27 Oct 2021 14:09:24 +0200 Subject: [PATCH 3/3] Correct documentation for template entity availability template (#20011) --- source/_integrations/cover.template.markdown | 2 +- source/_integrations/fan.template.markdown | 2 +- source/_integrations/light.template.markdown | 2 +- source/_integrations/lock.template.markdown | 2 +- source/_integrations/switch.template.markdown | 2 +- source/_integrations/template.markdown | 4 ++-- source/_integrations/vacuum.template.markdown | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/_integrations/cover.template.markdown b/source/_integrations/cover.template.markdown index 84b488af7b3..871f0704c6c 100644 --- a/source/_integrations/cover.template.markdown +++ b/source/_integrations/cover.template.markdown @@ -70,7 +70,7 @@ cover: required: false type: template availability_template: - description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If `availability_template` is not configured, the component will always be `available`. + description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns either of `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"` or a non-zero number, the entity is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the entity will always be `available`. Note that the string comparison not case sensitive; `"TrUe"` and `"yEs"` are allowed. required: false type: template default: true diff --git a/source/_integrations/fan.template.markdown b/source/_integrations/fan.template.markdown index 3b91b83ee1a..67bc7b8b00c 100644 --- a/source/_integrations/fan.template.markdown +++ b/source/_integrations/fan.template.markdown @@ -94,7 +94,7 @@ fan: required: false type: template availability_template: - description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If `availability_template` is not configured, the component will always be `available`. + description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns either of `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"` or a non-zero number, the entity is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the entity will always be `available`. Note that the string comparison not case sensitive; `"TrUe"` and `"yEs"` are allowed. required: false type: template default: true diff --git a/source/_integrations/light.template.markdown b/source/_integrations/light.template.markdown index a5526929d1a..a01d042be1f 100644 --- a/source/_integrations/light.template.markdown +++ b/source/_integrations/light.template.markdown @@ -145,7 +145,7 @@ light: required: false type: template availability_template: - description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If `availability_template` is not configured, the component will always be `available`. + description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns either of `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"` or a non-zero number, the entity is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the entity will always be `available`. Note that the string comparison not case sensitive; `"TrUe"` and `"yEs"` are allowed. required: false type: template default: true diff --git a/source/_integrations/lock.template.markdown b/source/_integrations/lock.template.markdown index 235b99b3b4b..310e6ea17d0 100644 --- a/source/_integrations/lock.template.markdown +++ b/source/_integrations/lock.template.markdown @@ -56,7 +56,7 @@ lock: required: true type: template availability_template: - description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If `availability_template` is not configured, the component will always be `available`. + description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns either of `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"` or a non-zero number, the entity is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the entity will always be `available`. Note that the string comparison not case sensitive; `"TrUe"` and `"yEs"` are allowed. required: false type: template default: true diff --git a/source/_integrations/switch.template.markdown b/source/_integrations/switch.template.markdown index c4e7c6e9841..3dadc0679e9 100644 --- a/source/_integrations/switch.template.markdown +++ b/source/_integrations/switch.template.markdown @@ -60,7 +60,7 @@ switch: type: template default: optimistic availability_template: - description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If `availability_template` is not configured, the component will always be `available`. + description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns either of `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"` or a non-zero number, the entity is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the entity will always be `available`. Note that the string comparison not case sensitive; `"TrUe"` and `"yEs"` are allowed. required: false type: template default: true diff --git a/source/_integrations/template.markdown b/source/_integrations/template.markdown index 4d5ff5fd5e5..da50f9926e1 100644 --- a/source/_integrations/template.markdown +++ b/source/_integrations/template.markdown @@ -236,7 +236,7 @@ select: required: false type: string availability: - description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the component will always be `available`. + description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns either of `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"` or a non-zero number, the entity is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the entity will always be `available`. Note that the string comparison not case sensitive; `"TrUe"` and `"yEs"` are allowed. required: false type: template default: true @@ -599,7 +599,7 @@ sensors: required: true type: template availability_template: - description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If `availability_template` is not configured, the component will always be `available`. + description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns either of `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"` or a non-zero number, the entity is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the entity will always be `available`. Note that the string comparison not case sensitive; `"TrUe"` and `"yEs"` are allowed. required: false type: template default: true diff --git a/source/_integrations/vacuum.template.markdown b/source/_integrations/vacuum.template.markdown index e337fdcaf3a..5fc9ac91e79 100644 --- a/source/_integrations/vacuum.template.markdown +++ b/source/_integrations/vacuum.template.markdown @@ -65,7 +65,7 @@ vacuum: required: true type: template availability_template: - description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If `availability_template` is not configured, the component will always be `available`. + description: Defines a template to get the `available` state of the entity. If the template either fails to render or returns either of `True`, `"1"`, `"true"`, `"yes"`, `"on"`, `"enable"` or a non-zero number, the entity is `available`. If the template returns any other value, the device will be `unavailable`. If not configured, the entity will always be `available`. Note that the string comparison not case sensitive; `"TrUe"` and `"yEs"` are allowed. required: false type: template default: true