add template change with device