diff --git a/blueprints/camera_motion_summary.yaml b/blueprints/camera_motion_summary.yaml index 3880128..302282b 100644 --- a/blueprints/camera_motion_summary.yaml +++ b/blueprints/camera_motion_summary.yaml @@ -67,6 +67,15 @@ blueprint: number: min: 1 max: 60 + max_frames: + name: Max Frames + description: How many frames to analyze. Picks frames with the most movement. + default: 3 + selector: + number: + min: 1 + max: 10 + step: 1 target_width: name: Target Width description: Width in pixels to downscale (uses less tokens) @@ -138,7 +147,7 @@ action: model: !input model message: !input message image_entity: !input camera_entities - interval: !input interval + max_frames: !input max_frames duration: !input duration include_filename: true target_width: !input target_width diff --git a/blueprints/frigate_event_summary.yaml b/blueprints/frigate_event_summary.yaml index 7eb1786..550d646 100644 --- a/blueprints/frigate_event_summary.yaml +++ b/blueprints/frigate_event_summary.yaml @@ -17,7 +17,7 @@ blueprint: multiline: false cooldown: name: Cooldown - description: Time in minutes to wait before running again + description: Time in minutes to wait before running again. default: 10 selector: number: @@ -45,12 +45,21 @@ blueprint: multiline: true interval: name: Interval - description: Analyze frames every seconds - default: 3 + description: "DEPRECATED: Use max_frames. Analyze frames every seconds" + default: 2 selector: number: min: 1 max: 60 + max_frames: + name: Max Frames + description: How many frames to analyze. Picks frames with the most movement. + default: 3 + selector: + number: + min: 1 + max: 10 + step: 1 target_width: name: Target Width description: Width in pixels to downscale (uses less tokens) @@ -62,7 +71,7 @@ blueprint: detail: name: Detail description: Detail parameter (OpenAI only) - default: 'high' + default: 'low' selector: select: options: @@ -139,7 +148,7 @@ action: provider: !input provider model: !input model message: !input message - interval: !input interval + max_frames: !input max_frames include_filename: false target_width: !input target_width detail: !input detail diff --git a/custom_components/llmvision/media_handlers.py b/custom_components/llmvision/media_handlers.py index 9d5c050..71d5bf0 100644 --- a/custom_components/llmvision/media_handlers.py +++ b/custom_components/llmvision/media_handlers.py @@ -351,13 +351,13 @@ async def add_videos(self, video_paths, event_ids, max_frames, target_width, inc _LOGGER.info( f"Deleted tmp folder: {tmp_clips_dir}") except FileNotFoundError as e: - _LOGGER.error(f"Failed to delete tmp folder: {e}") + _LOGGER.info(f"Failed to delete tmp folder: {e}") try: await self.hass.loop.run_in_executor(None, shutil.rmtree, tmp_frames_dir) _LOGGER.info( f"Deleted tmp folder: {tmp_frames_dir}") except FileNotFoundError as e: - _LOGGER.error(f"Failed to delete tmp folders: {e}") + _LOGGER.info(f"Failed to delete tmp folders: {e}") return self.client async def add_streams(self, image_entities, duration, max_frames, target_width, include_filename): diff --git a/custom_components/llmvision/services.yaml b/custom_components/llmvision/services.yaml index 93eb276..cf742e2 100644 --- a/custom_components/llmvision/services.yaml +++ b/custom_components/llmvision/services.yaml @@ -138,7 +138,7 @@ video_analyzer: multiline: true interval: name: Interval - description: "DEPRECATED: Analyze frames every seconds. Use max_frames" + description: "DEPRECATED: Use max_frames. Analyze frames every seconds." required: false example: 3 default: 3 @@ -148,7 +148,7 @@ video_analyzer: max: 60 max_frames: name: Max Frames - description: How many frames to extract. This will pick frames with the most movement. + description: How many frames to analyze. Picks frames with the most movement. required: false example: 3 default: 3 @@ -246,7 +246,7 @@ stream_analyzer: multiple: true interval: name: Interval - description: "DEPRECATED: Analyze frames every seconds. Use max_frames" + description: "DEPRECATED: Use max_frames. Analyze frames every seconds." required: false example: 2 default: 2 @@ -266,7 +266,7 @@ stream_analyzer: max: 60 max_frames: name: Max Frames - description: How many frames to extract. This will pick frames with the most movement. + description: How many frames to analyze. Picks frames with the most movement. required: false example: 3 default: 3