@DELETE
  @Timed
  @Path("{sceneId}")
  public Group deleteScene(@PathParam("groupId") long groupId, @PathParam("sceneId") long sceneId) {

    Group group = groups.getGroupById(groupId);
    if (group == null) {
      throw new WebApplicationException(404);
    }

    Scenes scenes = group.getScenes();
    Scene scene = scenes.getSceneById(sceneId);
    if (scene == null) {
      throw new WebApplicationException(404);
    }

    List<Long> lightIds = group.getLights();
    for (Long lightId : lightIds) {

      long prevScenesLastDeleted = scenes.getScenesLastDeleted();
      Light light = lights.getLightById(lightId);
      serialComm.writeCommand(
          "removeScene -s "
              + light.getShortNwkAddress()
              + " "
              + light.getEndpointId()
              + " "
              + group.getGroupAddress()
              + " "
              + scene.getId());

      long timeout = System.currentTimeMillis() + Config.WAIT_ATTR_TIMEOUT_MS;
      while (scenes.getScenesLastDeleted() <= prevScenesLastDeleted) {
        if (System.currentTimeMillis() >= timeout) break;
      }
    }
    return group;
  }