Skip to content

Commit

Permalink
lgtm
Browse files Browse the repository at this point in the history
  • Loading branch information
dcmartin committed Mar 13, 2020
1 parent a1689a0 commit 0f15301
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions homeassistant/motion/sensor.webcam.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -820,17 +820,17 @@
## detected
###

## human readable status
- platform: template
sensors:
motion_detected_status_${MOTION_CAMERA}:
friendly_name: Detected
friendly_name: Detected
entity_id:
- counter.motion_detected_counter_${MOTION_CAMERA}
value_template: >-
Counter: {{ states('counter.motion_detected_counter_${MOTION_CAMERA}') -}};
Counter: {{ states('counter.motion_detected_counter_${MOTION_CAMERA}') -}}/{{- states('sensor.motion_detected_counter_${MOTION_CAMERA}') -}};
{%- set e = states('sensor.motion_event_annotated_${MOTION_CAMERA}') -%}
{%- if e is not none %}
State: {{ e|lower == 'true' -}};
{%- set event = state_attr('sensor.motion_event_annotated_${MOTION_CAMERA}','event') -%}
{%- set count = state_attr('sensor.motion_event_annotated_${MOTION_CAMERA}','count') -%}
{%- set detected = state_attr('sensor.motion_event_annotated_${MOTION_CAMERA}','detected') -%}
Expand Down Expand Up @@ -1159,17 +1159,17 @@
## detected_entity
###

## human readable status
- platform: template
sensors:
motion_detected_entity_status_${MOTION_CAMERA}:
friendly_name: Detected entity
friendly_name: Detected entity
entity_id:
- counter.motion_detected_entity_counter_${MOTION_CAMERA}
value_template: >-
Counter: {{ states('counter.motion_detected_entity_counter_${MOTION_CAMERA}') -}};
{%- set e = states('sensor.motion_event_annotated_${MOTION_CAMERA}') %}
Counter: {{ states('counter.motion_detected_entity_counter_${MOTION_CAMERA}') -}}/{{- states('sensor.motion_detected_entity_counter_${MOTION_CAMERA}') -}};
{%- set e = states('sensor.motion_event_annotated_${MOTION_CAMERA}') -%}
{%- if e is not none %}
State: {{ e|lower == 'true' -}};
{%- set event = state_attr('sensor.motion_event_annotated_${MOTION_CAMERA}','event') %}
{%- set detected = state_attr('sensor.motion_event_annotated_${MOTION_CAMERA}','detected') %}
{%- set when = event.end|int|timestamp_custom("%a %b %d %I:%M:%S %p %Z") %}
Expand Down

0 comments on commit 0f15301

Please sign in to comment.