Hey all,
I am going crazy with triggering(!) an automation.
I have several Unifi Bullet G3 scattered around my house. As I do shutter control, lights et all with homeassistant I took the usual “sun” state to close the covers when the sun was setting. But sometimes due to rainy conditions or even a clear sky the time to open and close the covers is never on the spot. Then it occurred to me that the cameras have a very, very good attribute: is_dark. All cams turn on their IR when its “too dark” which is also spot-on for my taste.
I have an automation that when two cams in the front and two cams in the back turn their IR on (kind of a quorum) a bool is_day is set to false and during the morning another automation is setting the bool to true when the cams agree that it is day.
This works like a charm… but…
I am doing a trigger from camera.camera_garage (ie) and checking a change for the is_dark attribute. But even thou the attribute is correctly changing from true → false and vice-versa, there is nothing triggered. A trace shows “no traces found”. The main state of the camera “recording” never changes, just the one yaml attribute. Is there a bug that this is not working?
I am doing a time-pattern triggered condition, but that does not seem right (although working).
Here is a watered-down automation of what I am trying to accomplish:
alias: 'Debug: BasementCam bright'
description: 'Testing triggers'
trigger:
- platform: state
entity_id: camera.Camera_Basement
attribute: is_dark
from: 'true'
to: 'false'
condition: []
action:
- service: notify.mobile_app_a57phone
data:
message: 'Basementcam: Bright.'
title: Basement-Cam.
mode: single
Even thou the attribute “is_dark” is changing in the Developer Tools this is never triggered.
Thanks for any pointers!
-Chris.