Front camera automation no longer working

My front camera displays video but I can’t get the motion automation working.
I manually changed the id after copying the id (changed some hex values to make it unique) from another camera that works.
I don’t know how to get HA to reset the id since this does not work.

- alias: Notify iOS Front Camera
  initial_state: true
  trigger:
  - platform: state
    entity_id:
    - camera.front_camera
    to: 'on'
  action:
  - service: notify.mobile_app_iphone_13
    data:
      message: Front camera motion detected
      data:
        push:
          sound: Front camera motion detected.wav
  id: e53d14a2474249f0955197bfc439972f

Did you write this automation using the UI?

If not, remove it, create it via the UI and check the ID it comes up with (it will be different).

If you are doing it in yaml, since the ID must be unique (as you mentioned), try something that is definitely unique, like:

id: notify_ios_front_camera

edited for typos and clarity.

Thanks for your suggestions but I still cannot get my front camera to trigger an automation. It is going from idle to unavailiable.

OK, so unavailable implies a network connection issue. Is it stable through its own app?

The cameras all work using the Hikvision app… I am still working with redoing the automations using the UI. The automations are still not working. I send another message this afternoon with an example.

I do have a different question… How would I add the slider buttons (see above initial post) to enable/disable the automation using the UI.

I don’t understand the question - I can see the toggle in your opening post.

They were visible with my YAML automations but now I deleted all four camera automations and used the UI to create them (See screenshot).
Looks like I got the generic camera automations working. I will test when I get home.

Just noticed that the entitiy id use to be “binary_sensor.front_yard_motion”. and now it is “camera.front_camera”.
None of the cameras trigger off motion but I have been getting push notifications throughout the day. I do still have a “/homeassistant/binary_sensors.yaml” file

Old yaml code

#Front Camera Motion Detection
- alias: Notify iOS Front Camera
  initial_state: true
  trigger:
  - platform: state
    entity_id: binary_sensor.front_yard_motion
    to: 'on'
  action:
  - service: notify.mobile_app_keith
    data:
      message: Front camera motion detected
      data:
        push:
          sound: Front camera motion detected.wav

New yaml configuring with GUI

  alias: Front Camera Detected Motion
  description: ''
  trigger:
  - platform: state
    entity_id:
    - camera.front_camera
  condition: []
  action:
  - service: notify.mobile_app_iphone_13
    metadata: {}
    data:
      message: Front camera motion detected
  mode: single
- id: '1712711483881'

Okay… Getting closer… Now when I run action for any of the cameras I get barraged with push notifications. I have disable that automation and restart HA.

Here is my latest yaml code for the automation.

- id: notify_ios_front_camera
  alias: BBQ Camera Detected Motion
  description: ''
  trigger:
  - platform: state
    entity_id:
    - automation.bbq_camera_detected_motion
  condition: []
  action:
  - service: notify.mobile_app_iphone_13
    metadata: {}
    data:
      message: BBQ Motion Detected
  mode: single

I’m struggling to understand why you’re using the state of an automation as a trigger.

I’m open for suggestions… As I mentioned before. My yaml automations worked accept for one camera. I no longer have the option of “binary_sensor.bbq_motion” as an entity.

Old yaml automation:

#BBQ Camera Motion Detection
- alias: Notify iOS BBQ Camera
  initial_state: true
  trigger:
  - platform: state
    entity_id: binary_sensor.bbq_motion
    to: 'on'
  action:
  - service: notify.mobile_app_keith
    data:
      message: Barbeque camera motion detected
      data:
        push:
          sound: Barbeque camera motion detected.wav

Here are the last two lines in my configuration.yaml

binary_sensor: !include binary_sensors.yaml
automation: !include automations.yaml

what trigger are you using for the cameras that do work (are they also iOS devices)?

All four camera’s are Hikvision POE powered connected to an NVR. I still have not been able to get any of the camera’s to detect motion (me walking around). With the current configuration, I am getting intermittant push notifications that seem like motion is being detected.
Here is my latest automation for the BBQ camera.

- id: '1712966749466'
  alias: BBQ Camera Detects Motion
  description: ''
  trigger:
  - alias: When BBQ Camera Detected Motion
    platform: state
    entity_id:
    - camera.bbq_camera
    id: 'On'
  condition: []
  action:
  - service: notify.mobile_app_iphone_13
    metadata: {}
    data:
      message: BBQ camera detected motion
  mode: single

I have been reading about having to run the “enable_motion” service. I have tried this but get an error.

Here is a screenshot of the logbook of the front camera.
I got a push notification.

Got one of the camera’s working. Need to figure out how I got the entity to show up.

 entity_id:
    - binary_sensor.pool_motion

Update! Got 3 of the four camera’s working. Might be an issue with the front camera.