Simple Way of Adding Multiple Entities to an Area?

Hi there,

I am currently adding areas to my HA instance.

On the area configuration page I can not add any entities/ devices.
I have to go to entities and add a single entity to an area.

When selecting mutliple entities I am not able to add them to an area.

So I really have to add every entity one by one to an area?

Thanks!

/KNEBB

The Spook integration can do it:

action: homeassistant.add_entity_to_area
data:
  area_id: kitchen
  entity_id:
    - light.kitchen_1
    - light.counter_lights
    - light.hallway_1
    - light.hallway_2
    - light.hallway_3

Ok, got a step forward.

I guess I can use some sort of template to match the entities, right?

So what do I put into the entity_id field?
- sensor.wetter_{{ * }}

Or how is the correct syntax?
/KNEBB

Tried now with the following:

action: homeassistant.add_entity_to_area
data:
  aread_id: wetterdaten
  entity_id:
    - sensor.wetter*

And ran it manually. Got some errors in the trace:

Fehler: extra keys not allowed @ data['aread_id']
Ergebnis:

params:
  domain: homeassistant
  service: add_entity_to_area
  service_data:
    aread_id: wetterdaten
    entity_id:
      - sensor.wetter*
  target: {}
running_script: false

Any idea what I did wrong?
/KNEBB

You need to install the Spook integration from HACS… You don’t even seem to have clicked on the link. :laughing:

It is installed - for sure!
It has already alarmed me about some minor glitches:
grafik

You have a typo. It’s area_id, not aread_id

Hi,
I was trying to add multiple entities to an area:

action: homeassistant.add_entity_to_area
 data:
   area_id: stringa_a
   entity_id:
     - sensor.tigo_a*
     -

But I receive an error:

Unable to execute the action:
Homeassistant.add_entity_to_area
Unknown error

How it is supposed to bulky add entities to an area? Maybe using a template to enumerate the entities, or by adding the entities to a label?

First, did you install the Spook integration linked above?

Yes, you need to either list the entities manually or use a template to create the list. Wildcards like sensor.tigo_a* are not supported.

Yes, spook integration is installed. I’ll try to create a template then.
thanks