From 798e2e9f5a814ebdf575ec863564a5b1fe8b6def Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 8 Aug 2018 08:44:37 +0100 Subject: [PATCH 1/2] Add info on teaching automations --- .../image_processing.facebox.markdown | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/source/_components/image_processing.facebox.markdown b/source/_components/image_processing.facebox.markdown index a53e8d44c880..d6cfe73205a0 100644 --- a/source/_components/image_processing.facebox.markdown +++ b/source/_components/image_processing.facebox.markdown @@ -118,6 +118,56 @@ A valid service data example: ``` {% endraw %} +You can use an automation to receive a notification when you train a face: + +{% raw %} +```yaml +- id: '1533703568569' + alias: Face taught + trigger: + - event_data: + service: facebox_teach_face + event_type: call_service + platform: event + condition: [] + action: + - service: notify.pushbullet + data_template: + message: '{{ trigger.event.data.service_data.name }} taught + with file {{ trigger.event.data.service_data.file_path }}' + title: Face taught notification +``` +{% endraw %} + +Any errors on teaching will be reported in the logs. If you enable [system_log](https://www.home-assistant.io/components/system_log/) events: + +{% raw %} +```yaml +system_log: + fire_event: true +``` +{% endraw %} + +you can create an automation to receive notifications on Facebox errors: + +{% raw %} +```yaml +- id: '1533703568577' + alias: Facebox error + trigger: + platform: event + event_type: system_log_event + condition: + condition: template + value_template: '{{ "facebox" in trigger.event.data.message }}' + action: + - service: notify.pushbullet + data_template: + message: '{{ trigger.event.data.message }}' + title: Facebox error +``` +{% endraw %} + ## {% linkable_title Optimising resources %} [Image processing components](https://www.home-assistant.io/components/image_processing/) process the image from a camera at a fixed period given by the `scan_interval`. This leads to excessive processing if the image on the camera hasn't changed, as the default `scan_interval` is 10 seconds. You can override this by adding to your config `scan_interval: 10000` (setting the interval to 10,000 seconds), and then call the `image_processing.scan` service when you actually want to perform processing. From a230db19d4ecb8271f1eed13131d922690136b23 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 8 Aug 2018 19:20:42 +0100 Subject: [PATCH 2/2] tidy raw tags --- source/_components/image_processing.facebox.markdown | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/_components/image_processing.facebox.markdown b/source/_components/image_processing.facebox.markdown index d6cfe73205a0..5723f5abaa85 100644 --- a/source/_components/image_processing.facebox.markdown +++ b/source/_components/image_processing.facebox.markdown @@ -141,12 +141,10 @@ You can use an automation to receive a notification when you train a face: Any errors on teaching will be reported in the logs. If you enable [system_log](https://www.home-assistant.io/components/system_log/) events: -{% raw %} ```yaml system_log: fire_event: true ``` -{% endraw %} you can create an automation to receive notifications on Facebox errors: