From 124e337f10ba8804dfbab03fe56de73084d8fcb6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sun, 15 Aug 2021 16:50:43 -0400 Subject: [PATCH] Added new motion tracker utility meter sensor to tell me how many times motion was sensed at front door --- config/packages/sysmon.yaml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/config/packages/sysmon.yaml b/config/packages/sysmon.yaml index d390e3f..7b94dad 100755 --- a/config/packages/sysmon.yaml +++ b/config/packages/sysmon.yaml @@ -59,9 +59,29 @@ sensor: friendly_name: Open Pull Requests value_template: >- {{ states.sensor.home_assistant_configuration.attributes.open_pull_requests }} - - + + # For tracking number of times motion is detected + # at front door in last 7 days + - platform: history_stats + name: Front Door Motion + entity_id: binary_sensor.aarlo_motion_front_door + state: 'on' + type: count + end: '{{ now() }}' + duration: + days: 7 + utility_meter: + # Use the 7 day history of motion at front door + # to get daily motion. daily_frontdoor_motion: source: sensor.front_door_motion - cycle: daily \ No newline at end of file + cycle: daily + + + + + + + + \ No newline at end of file