Vacuum Automation Error at runtime

I have an automation that is triggered by time to send a vacuum off to clean two rooms. I only added this automation yesterday and it ran perfectly yesterday but today I received an error which I don’t understand. Can anyone please advise on this?

Log error:

Logger: homeassistant.components.automation.cleaning_schedule
Source: components/automation/__init__.py:572 
Integration: Automation (documentation, issues) 
First occurred: 10:00:00 AM (1 occurrences) 
Last logged: 10:00:00 AM

Error while executing automation automation.cleaning_schedule: must contain at least one of entity_id, device_id, area_id.

Automation:

- alias: Cleaning Schedule
  id: cleaning_schedule
  mode: single
  trigger:
    platform: time
    at: '10:00:00'
  condition:
  - condition: template
    value_template: '{{ (is_state("device_tracker.iphone_m_icloud", "home")
        or is_state ("device_tracker.iphone_r_icloud", "home"))
        }}'
  action:
  - service: vacuum.send_command
    data:
      command: roomClean
      params:
        roomIds:
          - 1
          - 2
        count: 1
  - service: vacuum.set_fan_speed
    data:
      fan_speed: Turbo
    target:
      entity_id: vacuum.bob_the_bot

Log Trace:

This service has no target.

1 Like

Thanks. Just added target to that service also, and it didn’t work but with no error in the logs. However, I tried again and it’s started. Maybe an issue with the integration?

To be clear: You’ve added

target:
  entity_id: …

?

Yes, my new automation is below:

- alias: Cleaning Schedule
  id: cleaning_schedule
  mode: single
  trigger:
    platform: time
    at: '10:00:00'
  condition:
  - condition: template
    value_template: '{{ (is_state("device_tracker.iphone_m_icloud", "home")
        or is_state ("device_tracker.iphone_r_icloud", "home"))
        }}'
  action:
  - service: vacuum.send_command
    target:
      entity_id: vacuum.bob_the_bot
    data:
      command: roomClean
      params:
        roomIds:
          - 1
          - 2
        count: 1
  - service: vacuum.set_fan_speed
    target:
      entity_id: vacuum.bob_the_bot
    data:
      fan_speed: Turbo
1 Like