various tidyups
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#:########################################################################################:#
|
||||
# Package: CCTV Motion Feed
|
||||
# File: cctv_controls.yaml
|
||||
# Version: v1.1.0
|
||||
# Date: 2026-07-24
|
||||
# Version: v1.2.0
|
||||
# Date: 2026-08-06
|
||||
#
|
||||
# Purpose:
|
||||
# Provides a Home Assistant binary sensor for front-door motion messages
|
||||
@@ -14,6 +14,7 @@
|
||||
#
|
||||
#
|
||||
# Version History:
|
||||
# - v1.2.0 (2026-08-06): Match MotionEye HA plugin ON/OFF MQTT payloads.
|
||||
# - v1.1.0 (2026-07-24): Added explicit numeric ON/OFF payloads (P013-F039).
|
||||
# - v1.0.0 (2022-10-11): Initial CCTV front-door motion sensor package.
|
||||
#:########################################################################################:#
|
||||
@@ -23,6 +24,38 @@ mqtt:
|
||||
- unique_id: front_door_movement_camera_corner
|
||||
name: "Front Door Movement"
|
||||
state_topic: "viewroad-status/cctv/front_door_motion"
|
||||
payload_on: "1"
|
||||
payload_off: "0"
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
icon: mdi:exit-run
|
||||
|
||||
input_datetime:
|
||||
entranceway_last_detection:
|
||||
name: Entranceway Last Detection
|
||||
has_date: true
|
||||
has_time: true
|
||||
|
||||
template:
|
||||
- binary_sensor:
|
||||
- name: Entranceway Detection
|
||||
unique_id: entranceway_detection
|
||||
state: >-
|
||||
{{ is_state('binary_sensor.view_road_front_door_motion', 'on')
|
||||
or is_state('binary_sensor.front_door_movement', 'on') }}
|
||||
|
||||
automation:
|
||||
- id: entranceway_detection_last_seen
|
||||
alias: Entranceway Detection - Record Last Activity
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.view_road_front_door_motion
|
||||
to: "on"
|
||||
- platform: mqtt
|
||||
topic: viewroad-status/cctv/front_door_motion
|
||||
payload: "ON"
|
||||
action:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.entranceway_last_detection
|
||||
data:
|
||||
datetime: "{{ now().strftime('%Y-%m-%d %H:%M:%S') }}"
|
||||
|
||||
Reference in New Issue
Block a user