WTH there is no easy way to assign / change areas via automations (2024)

Refreshing a 2022 WTH entry.

When trying to build an automation via the UI, I’m not able to change areas for devices (and entities):

description: ""
mode: single
trigger:
  - platform: state
    entity_id:
      - sensor.mysensor_estimated_distance
    attribute: source
    to: "\"FF:FF:FF:FF:FF:FF\""
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition: []
action:
  # here ideally we would be able to programmatically change the area for the device either:
  # A) device.move_area_to: area_id
  # B) call_service 'area_change' device_id area_id
  # C) area.remove / area.add device_id 
  # whichever is more architecturally sound
    data: {}

Link for other users’ comments:

Spook, a custom integration can do this

1 Like