Update multiple entities in one API call?

Ref rest api.

If I have two entities i want to update with the API, can I do this in just ONE api call, or do I have to make two calls?

example:
I want to set light.outside to on
and also set light.inside to off

Is it possible? If so how should the JSON be formated?

No, not that Iā€™m aware of, because this would generally require two services: light/turn_on and light/turn_off. Unless it just so happens that light.outside is off and light.inside is on at the time, then you could do it with light/toggle. :wink:

1 Like

thanks :slight_smile: .
What if same service are used with different entities and values?

example:
I want to set light.outside to on with brightness: 100
and also set light.inside to on with brightness: 200

Still no. Basically, you can only do with the service allows. For turning on a light, see Service light.turn_on.

1 Like

okey then :slight_smile: thanks