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

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

description: ""
mode: single
  - platform: state
      - sensor.mysensor_estimated_distance
    attribute: source
    to: "\"FF:FF:FF:FF:FF:FF\""
      hours: 0
      minutes: 5
      seconds: 0
condition: []
  # 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: {}

Out of curiosity, what we be the use case - or why would you like to achieve that?

It opens up a better way to do room presence detection, e.g. changing the iBeacon entity area dinamycally, and adds more use to Areas.

1 Like

I have a use case for this as well: I have a standing lamp that i sometimes move between two rooms. All my light automations are controlling areas not individual lights so i would like an eassy way to change the lights area for example: I could stick an nfc tag to the lamp so when i move it, i scan it, that could trigger an automation that toggles the area of the light between the two rooms i’am using it in. All my automations would then automatically correctly continue to work withouth turning the standing lamp on when not desired or not turning it on when it sould be turned on.

1 Like